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.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -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; |