mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] workqueue: Make the PWQ allocation and WQ enlistment atomic
@ 2024-07-03  3:38 Lai Jiangshan
  2024-07-03  3:38 ` [PATCH 1/6] workqueue: Register sysfs after the whole creation of the new wq Lai Jiangshan
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Lai Jiangshan @ 2024-07-03  3:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Lai Jiangshan, Tejun Heo

From: Lai Jiangshan <jiangshan.ljs@antgroup.com>

The PWQ allocation and WQ enlistment are not within the same lock-held
critical section; therefore, their states can become out of sync when
the user modifies the unbound mask or if CPU hotplug events occur in
the interim since those operations only update the WQs that are already
in the list.

Lai Jiangshan (6):
  workqueue: Register sysfs after the whole creation of the new wq
  workqueue: Protect wq_unbound_cpumask with wq_pool_attach_mutex in
    init_rescuer()
  workqueue: Separate out destroy_rescuer()
  workqueue: Init rescuer before alloc and link pwqs
  workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs()
  workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.

Cc: Tejun Heo <tj@kernel.org>

 kernel/workqueue.c | 110 ++++++++++++++++++++++++++-------------------
 1 file changed, 63 insertions(+), 47 deletions(-)

-- 
2.19.1.6.gb485710b


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-07-03 18:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-03  3:38 [PATCH 0/6] workqueue: Make the PWQ allocation and WQ enlistment atomic Lai Jiangshan
2024-07-03  3:38 ` [PATCH 1/6] workqueue: Register sysfs after the whole creation of the new wq Lai Jiangshan
2024-07-03  3:38 ` [PATCH 2/6] workqueue: Protect wq_unbound_cpumask with wq_pool_attach_mutex in init_rescuer() Lai Jiangshan
2024-07-03 15:14   ` Waiman Long
2024-07-03 18:28   ` Tejun Heo
2024-07-03  3:38 ` [PATCH 3/6] workqueue: Separate out destroy_rescuer() Lai Jiangshan
2024-07-03  3:38 ` [PATCH 4/6] workqueue: Init rescuer before alloc and link pwqs Lai Jiangshan
2024-07-03  3:38 ` [PATCH 5/6] workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs() Lai Jiangshan
2024-07-03  3:38 ` [PATCH 6/6] workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S Lai Jiangshan

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®