diff --git a/kernel/workqueue.c b/kernel/workqueue.c index d8a2084b88db..3860c09d6ac1 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1454,6 +1454,9 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq, local_irq_save(flags); + /* Pair with the smp_wmb() in set_work_pool_and_clear_pending. */ + smp_rmb(); + if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work))) { __queue_work(cpu, wq, work); ret = true;