* [PATCH] workqueue: Removed double allocation of wq_update_pod_attrs_buf
@ 2023-09-05 21:49 Steven Rostedt
2023-09-15 11:26 ` Geert Uytterhoeven
2023-09-18 18:36 ` Tejun Heo
0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2023-09-05 21:49 UTC (permalink / raw)
To: LKML; +Cc: Tejun Heo, Lai Jiangshan
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
First commit 2930155b2e272 ("workqueue: Initialize unbound CPU pods later in
the boot") added the initialization of wq_update_pod_attrs_buf to
workqueue_init_early(), and then latter on, commit 84193c07105c6
("workqueue: Generalize unbound CPU pods") added it as well. This appeared
in a kmemleak run where the second allocation made the first allocation
leak.
Fixes: 84193c07105c6 ("workqueue: Generalize unbound CPU pods")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/workqueue.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c85825e17df8..129328b765fb 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -6535,9 +6535,6 @@ void __init workqueue_init_early(void)
BUG_ON(!zalloc_cpumask_var_node(&pt->pod_cpus[0], GFP_KERNEL, NUMA_NO_NODE));
- wq_update_pod_attrs_buf = alloc_workqueue_attrs();
- BUG_ON(!wq_update_pod_attrs_buf);
-
pt->nr_pods = 1;
cpumask_copy(pt->pod_cpus[0], cpu_possible_mask);
pt->pod_node[0] = NUMA_NO_NODE;
--
2.40.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] workqueue: Removed double allocation of wq_update_pod_attrs_buf
2023-09-05 21:49 [PATCH] workqueue: Removed double allocation of wq_update_pod_attrs_buf Steven Rostedt
@ 2023-09-15 11:26 ` Geert Uytterhoeven
2023-09-18 18:36 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-09-15 11:26 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, Tejun Heo, Lai Jiangshan
On Thu, Sep 7, 2023 at 8:46 AM Steven Rostedt <rostedt@goodmis.org> wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
>
> First commit 2930155b2e272 ("workqueue: Initialize unbound CPU pods later in
> the boot") added the initialization of wq_update_pod_attrs_buf to
> workqueue_init_early(), and then latter on, commit 84193c07105c6
> ("workqueue: Generalize unbound CPU pods") added it as well. This appeared
> in a kmemleak run where the second allocation made the first allocation
> leak.
>
> Fixes: 84193c07105c6 ("workqueue: Generalize unbound CPU pods")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Just noticed this, too.
John posted a similar patch after you:
https://lore.kernel.org/all/20230913101634.553699-1-john.ogness@linutronix.de/
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] workqueue: Removed double allocation of wq_update_pod_attrs_buf
2023-09-05 21:49 [PATCH] workqueue: Removed double allocation of wq_update_pod_attrs_buf Steven Rostedt
2023-09-15 11:26 ` Geert Uytterhoeven
@ 2023-09-18 18:36 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2023-09-18 18:36 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, Lai Jiangshan
On Tue, Sep 05, 2023 at 05:49:35PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
>
> First commit 2930155b2e272 ("workqueue: Initialize unbound CPU pods later in
> the boot") added the initialization of wq_update_pod_attrs_buf to
> workqueue_init_early(), and then latter on, commit 84193c07105c6
> ("workqueue: Generalize unbound CPU pods") added it as well. This appeared
> in a kmemleak run where the second allocation made the first allocation
> leak.
>
> Fixes: 84193c07105c6 ("workqueue: Generalize unbound CPU pods")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Applied to wq/for-6.6-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-18 18:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05 21:49 [PATCH] workqueue: Removed double allocation of wq_update_pod_attrs_buf Steven Rostedt
2023-09-15 11:26 ` Geert Uytterhoeven
2023-09-18 18:36 ` Tejun Heo
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®