mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] workqueue: Fix double kfree for rescuer
@ 2020-05-25  9:30 qiang.zhang
  2020-05-25 10:01 ` Markus Elfring
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: qiang.zhang @ 2020-05-25  9:30 UTC (permalink / raw)
  To: tj; +Cc: jiangshanlai, markus.elfring, linux-kernel

From: Zhang Qiang <qiang.zhang@windriver.com>

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 <qiang.zhang@windriver.com>
---
 v1->v2->v3:
 Only commit information modification.
 kernel/workqueue.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 891ccad5f271..a2451cdcd503 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3491,7 +3491,6 @@ static void rcu_free_wq(struct rcu_head *rcu)
 	else
 		free_workqueue_attrs(wq->unbound_attrs);
 
-	kfree(wq->rescuer);
 	kfree(wq);
 }
 
-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-26 10:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  9:30 [PATCH v3] workqueue: Fix double kfree for rescuer qiang.zhang
2020-05-25 10:01 ` Markus Elfring
2020-05-25 10:01 ` Markus Elfring
2020-05-26  8:56 ` Lai Jiangshan
2020-05-26  9:11   ` [v3] " Markus Elfring
2020-05-26 10:04   ` [PATCH v3] " Zhang, Qiang
2020-05-26 10:34     ` [v3] " Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®