lkml.org 
[lkml]   [2023]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] workqueue: Fix UAF report by KASAN in pwq_release_workfn()
Hello,

The patch looks fine but

On Tue, Sep 19, 2023 at 04:19:58PM +0800, Zqiang wrote:
> @@ -4743,6 +4743,8 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
> wq_free_lockdep(wq);
> err_free_wq:
> free_workqueue_attrs(wq->unbound_attrs);

Can you please add a comment here explaining why the flushing is necessary?

> + if (wq->flags & WQ_UNBOUND)
> + kthread_flush_worker(pwq_release_worker);

Thanks.

--
tejun

\
 
 \ /
  Last update: 2023-09-19 19:45    [W:0.052 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site