Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fix from Tejun Heo:
"Another fix for a really old bug.

It only affects drain_workqueue() which isn't used often and even then
triggers only during a pretty small race window, so it isn't too
surprising that it stayed hidden for so long.

The fix is straight-forward and low-risk. Kudos to Li Bin for
reporting and fixing the bug"

* 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: Fix NULL pointer dereference

+2 -1
+2 -1
kernel/workqueue_internal.h
··· 10 10 11 11 #include <linux/workqueue.h> 12 12 #include <linux/kthread.h> 13 + #include <linux/preempt.h> 13 14 14 15 struct worker_pool; 15 16 ··· 61 60 */ 62 61 static inline struct worker *current_wq_worker(void) 63 62 { 64 - if (current->flags & PF_WQ_WORKER) 63 + if (in_task() && (current->flags & PF_WQ_WORKER)) 65 64 return kthread_data(current); 66 65 return NULL; 67 66 }