Files
linux/kernel
Breno Leitao 1d125f0e6c workqueue: use RCU accessors when populating wq->cpu_pwq
wq->cpu_pwq holds RCU-protected pwq pointers, but the percpu allocation
path fills it in with plain loads and stores, which sparse flags:

  kernel/workqueue.c:5682:57: sparse: incorrect type in initializer (different address spaces) @@     expected struct pool_workqueue **pwq_p @@     got struct pool_workqueue [noderef] __rcu ** @@

Allocate the array as __rcu pointers and publish each pwq with
rcu_assign_pointer() once it is initialized and linked, the order
install_unbound_pwq() uses.

The warnings are not new: commit 79f23600bc ("workqueue: factor out
get_percpu_pool()") only turned the flagged assignment into an
initializer.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202608120931.tvTzq1gD-lkp@intel.com/
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
2026-08-12 07:06:17 -10:00
..
2026-06-02 15:36:06 +02:00
2026-03-27 10:19:08 -05:00
2025-10-29 10:29:54 +01:00
2026-01-26 19:07:13 -08:00