Re: [PATCH 2/2] workqueue: doc: clarify cancel_work_sync() cross-workqueue behavior

From: Tejun Heo

Date: Tue Nov 24 2026 - 22:25:29 EST


Applied to wq/for-7.5.

Note that cancel_work_sync() and friends haven't been waiting for a work
item which is still running from a different workqueue since 606a5020b9bd
("workqueue: gut flush[_delayed]_work_sync()") which went in in v3.7. This
has been broken for well over a decade and the documentation now says so.

The following queue the same work item on more than one workqueue and then
sync-cancel or flush it. As cancel_work_sync() doesn't guarantee that the
work item is quiescent in that case, they need to make sure in some other
way, e.g. by flushing the workqueues that are involved. Note that system_wq
and system_percpu_wq, which schedule_work() uses, are different workqueues.
cc'ing the maintainers.

- drivers/char/ipmi/ipmi_msghandler.c: smi_work
- drivers/md/dm-mpath.c: trigger_event
- net/smc/smc_llc.c: llc_event_work
- sound/soc/codecs/rt5651.c: jack_detect_work
- sound/soc/codecs/rt5682s.c: jack_detect_work
- sound/soc/soc-jack.c: snd_soc_jack_gpio.work
- drivers/input/misc/palmas-pwrbutton.c: input_work
- drivers/cpufreq/qcom-cpufreq-hw.c: throttle_work
- drivers/vdpa/vdpa_user/vduse_dev.c: vduse_virtqueue.inject

Thanks.

--
tejun