Message ID | 20201103181712.QU928QUTg%akpm@linux-foundation.org |
---|---|
State | New |
Headers | show |
Series | [merged] kthread_worker-prevent-queuing-delayed-work-from-timer_fn-when-it-is-being-canceled.patchremoved from -mm tree | expand |
--- a/kernel/kthread.c~kthread_worker-prevent-queuing-delayed-work-from-timer_fn-when-it-is-being-canceled +++ a/kernel/kthread.c @@ -897,7 +897,8 @@ void kthread_delayed_work_timer_fn(struc /* Move the work from worker->delayed_work_list. */ WARN_ON_ONCE(list_empty(&work->node)); list_del_init(&work->node); - kthread_insert_work(worker, work, &worker->work_list); + if (!work->canceling) + kthread_insert_work(worker, work, &worker->work_list); raw_spin_unlock_irqrestore(&worker->lock, flags); }