Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Dan Carpenter
On Thu, May 28, 2020 at 09:27:03PM +0800, Lai Jiangshan wrote: > On Thu, May 28, 2020 at 8:27 PM Dan Carpenter > wrote: > > > > On Thu, May 28, 2020 at 08:08:06PM +0800, Lai Jiangshan wrote: > > > On Thu, May 28, 2020 at 5:57 PM Dan Carpenter > > > wrote: > > > > > > > > Guys, the patch is

Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Tejun Heo
Hello, On Thu, May 28, 2020 at 09:27:03PM +0800, Lai Jiangshan wrote: > wq owns the ultimate or permanent references to itself by > owning references to wq->numa_pwq_tbl[node], wq->dfl_pwq. > The pwq's references keep the pwq in wq->pwqs. Yeah, regardless of who puts a wq the last time, the base

Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Lai Jiangshan
On Thu, May 28, 2020 at 8:27 PM Dan Carpenter wrote: > > On Thu, May 28, 2020 at 08:08:06PM +0800, Lai Jiangshan wrote: > > On Thu, May 28, 2020 at 5:57 PM Dan Carpenter > > wrote: > > > > > > Guys, the patch is wrong. The kfree is harmless when this is called > > > from destroy_workqueue()

Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Dan Carpenter
On Thu, May 28, 2020 at 08:08:06PM +0800, Lai Jiangshan wrote: > On Thu, May 28, 2020 at 5:57 PM Dan Carpenter > wrote: > > > > Guys, the patch is wrong. The kfree is harmless when this is called > > from destroy_workqueue() and required when it's called from > > pwq_unbound_release_workfn().

Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Lai Jiangshan
On Thu, May 28, 2020 at 5:57 PM Dan Carpenter wrote: > > Guys, the patch is wrong. The kfree is harmless when this is called > from destroy_workqueue() and required when it's called from > pwq_unbound_release_workfn(). Lai Jiangshan already explained this > already. Why are we still discussing

Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Tejun Heo
On Thu, May 28, 2020 at 12:57:03PM +0300, Dan Carpenter wrote: > Guys, the patch is wrong. The kfree is harmless when this is called > from destroy_workqueue() and required when it's called from > pwq_unbound_release_workfn(). Lai Jiangshan already explained this > already. Why are we still

Re: 回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-28 Thread Dan Carpenter
Guys, the patch is wrong. The kfree is harmless when this is called from destroy_workqueue() and required when it's called from pwq_unbound_release_workfn(). Lai Jiangshan already explained this already. Why are we still discussing this? regards, dan carpenter

回复: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-27 Thread Zhang, Qiang
-kernel@vger.kernel.org ; kernel-janit...@vger.kernel.org 主题: Re: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq() > Thus delete this function call which became unnecessary with the referenced > software update. … > Suggested-by: Markus Elfring Would the tag “Co-

[PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-27 Thread qiang.zhang
From: Zhang Qiang The data structure member "wq->rescuer" was reset to a null pointer in one if branch. It was passed to a call of the function "kfree" in the callback function "rcu_free_wq" (which was eventually executed). The function "kfree" does not perform more meaningful data processing

Re: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-27 Thread Tejun Heo
On Wed, May 27, 2020 at 03:57:15PM +0800, qiang.zh...@windriver.com wrote: > From: Zhang Qiang > > The data structure member "wq->rescuer" was reset to a null pointer > in one if branch. It was passed to a call of the function "kfree" > in the callback function "rcu_free_wq" (which was

Re: [PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-27 Thread Markus Elfring
> Thus delete this function call which became unnecessary with the referenced > software update. … > Suggested-by: Markus Elfring Would the tag “Co-developed-by” be more appropriate according to the patch review to achieve a more pleasing commit message? > v1->v2->v3->v4->v5: > Modify

[PATCH v5] workqueue: Remove unnecessary kfree() call in rcu_free_wq()

2020-05-27 Thread qiang.zhang
From: Zhang Qiang The data structure member "wq->rescuer" was reset to a null pointer in one if branch. It was passed to a call of the function "kfree" in the callback function "rcu_free_wq" (which was eventually executed). The function "kfree" does not perform more meaningful data processing