CVE-2026-99058: workqueue: Fix NULL current_pwq deref in chained work check
In the Linux kernel, the following vulnerability has been resolved:
workqueue: Fix NULL currentpwq deref in chained work check
currentwqworker() only tells us that %current is a kworker. It does not guarantee that the worker is currently executing a work item, as worker->currentpwq is populated only while processonework() is running the work function.
ischainedwork() can be reached while queueing on a draining or destroying workqueue. If a kworker outside work-item execution reaches that path, currentwqworker() returns a worker but worker->currentpwq is NULL, and the chained-work test can fault before it emits the intended warning.
Guard the chained-work test with worker->currentpwq. A kworker without currentpwq is not executing work on the target workqueue, so the helper should return false and let the draining/destroying warning fire.