[lkml]   [2020]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] workqueue: Fix double kfree(rescuer) in destroy_workqueue()
> When destroy_workqueue if rescuer worker exist,wq->rescuer pointer be
> kfree. if sanity checks passed. the func call_rcu(&wq->rcu, rcu_free_wq)
> will be called if the wq->flags & WQ_UNBOUND is false,in rcu_free_wq
> func wq->rescuer pointer was kfree again.

1. I suggest to improve also this change description.
Do you try to explain here that a call of the function “free_workqueue_attrs”
(or “free_percpu”) would perform sufficient clean-up of system resources
in this use case?

2. You proposed to delete the function call “kfree(wq->rescuer)” from
the implementation of the function “rcu_free_wq”.

This function name should be specified also in the patch subject,
shouldn't it?

3. Would you like to add the tag “Fixes” to the commit message?


 \ /
  Last update: 2020-05-24 17:34    [W:0.049 / U:3.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site