[lkml]   [2019]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] auxdisplay: ht16k33: fix potential user-after-free on module unload
On Fri, Feb 8, 2019 at 7:15 PM Miguel Ojeda
<> wrote:
> On module unload/remove, we need to ensure that work does not run
> after we have freed resources. Concretely, cancel_delayed_work()
> may return while the callback function is still running.
> From kernel/workqueue.c:
> The work callback function may still be running on return,
> unless it returns true and the work doesn't re-arm itself.
> Explicitly flush or use cancel_delayed_work_sync() to wait on it.
> Link:
> Reported-by: Sven Van Asbroeck <>
> Signed-off-by: Miguel Ojeda <>

Yes, this should do the trick.

Reviewed-by: Sven Van Asbroeck <>

 \ /
  Last update: 2019-02-10 23:04    [W:0.075 / U:27.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site