summaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorZhang Qiang <qiang.zhang@windriver.com>2020-05-27 15:57:15 +0800
committerTejun Heo <tj@kernel.org>2020-05-27 09:52:41 -0400
commit342ed2400b78072cc01c0130ce41240dec60d56d (patch)
tree95d74a595229824b4fd8231ca8d81e147d817a8d /kernel/workqueue.c
parentb92b36eadf4d7fa4a34f048c2a3bb61a735a885e (diff)
downloadlinux-342ed2400b78072cc01c0130ce41240dec60d56d.tar.gz
linux-342ed2400b78072cc01c0130ce41240dec60d56d.tar.bz2
linux-342ed2400b78072cc01c0130ce41240dec60d56d.zip
workqueue: Remove unnecessary kfree() call in rcu_free_wq()
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 for a passed null pointer (besides immediately returning from such a call). Thus delete this function call which became unnecessary with the referenced software update. Fixes: def98c84b6cd ("workqueue: Fix spurious sanity check failures in destroy_workqueue()") Suggested-by: Markus Elfring <Markus.Elfring@web.de> Signed-off-by: Zhang Qiang <qiang.zhang@windriver.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 10ed8d761e0b..7a1fc9fe6314 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);
}