History

workqueue: Removed double allocation of wq_update_pod_attrs_buf

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.

Steven Rostedt (Google) committed 3 years ago

Commit a6828211 parent ce9ecca1 file · +0 −3Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+0−3
@@ -6535,9 +6535,6 @@ void __init workqueue_init_early(void) · 6534 unmodified lines
6535 6535
6536 BUG_ON(!zalloc_cpumask_var_node(&pt->pod_cpus[0], GFP_KERNEL, NUMA_NO_NODE));6536 BUG_ON(!zalloc_cpumask_var_node(&pt->pod_cpus[0], GFP_KERNEL, NUMA_NO_NODE));
6537 6537
6538 wq_update_pod_attrs_buf = alloc_workqueue_attrs();
6539 BUG_ON(!wq_update_pod_attrs_buf);
6540
6541 pt->nr_pods = 1;6538 pt->nr_pods = 1;
6542 cpumask_copy(pt->pod_cpus[0], cpu_possible_mask);6539 cpumask_copy(pt->pod_cpus[0], cpu_possible_mask);
6543 pt->pod_node[0] = NUMA_NO_NODE;6540 pt->pod_node[0] = NUMA_NO_NODE;