Re: [PATCH v3] workqueue: Fix double kfree for rescuer

2020-05-26 Thread Zhang, Qiang
Thank you reply There is something wrong with my description. is it feasible to describe as follows: The resucer is already free in "destroy_workqueue" and "wq->rescuer = NULL" was executed, but in "rcu_free_wq" it's release again (equivalent to kfree(NULL)), this is unnecessary, so

Re: [PATCH v3] workqueue: Fix double kfree for rescuer

2020-05-26 Thread Lai Jiangshan
On Mon, May 25, 2020 at 5:22 PM wrote: > > From: Zhang Qiang > > The callback function "rcu_free_wq" could be called after memory > was released for "rescuer" already, Thus delete a misplaced call > of the function "kfree". Hello wq->rescuer is guaranteed to be NULL in rcu_free_wq() since def98

Re: [PATCH v3] workqueue: Fix double kfree for rescuer

2020-05-25 Thread Markus Elfring
> The callback function "rcu_free_wq" could be called after memory > was released for "rescuer" already, Thus delete a misplaced call > of the function "kfree". I got into the mood to follow your interpretation of the software situation for a moment. I have taken another look also at the implemen

Re: [PATCH v3] workqueue: Fix double kfree for rescuer

2020-05-25 Thread Markus Elfring
> The callback function "rcu_free_wq" could be called after memory > was released for "rescuer" already, Thus delete a misplaced call > of the function "kfree". I got into the mood to follow your interpretation of the software situation for a moment. I have taken another look also at the implemen

[PATCH v3] workqueue: Fix double kfree for rescuer

2020-05-25 Thread qiang.zhang
From: Zhang Qiang The callback function "rcu_free_wq" could be called after memory was released for "rescuer" already, Thus delete a misplaced call of the function "kfree". Fixes: 6ba94429c8e7 ("workqueue: Reorder sysfs code") Signed-off-by: Zhang Qiang --- v1->v2->v3: Only commit information