Re: [PATCH] task_work: return -EBUSY when adding same work

From: zhenguo yao
Date: Mon Jul 12 2021 - 05:14:06 EST

OK,Got it. My patch does not cover this situation. It seems that
there is always dead-loop when same works are added to the list.

Jens Axboe <axboe@xxxxxxxxx> 于2021年7月12日周一 上午10:44写道:
> On 7/11/21 8:13 PM, zhenguo yao wrote:
> > Yes I hit this condition. The caller is queue_task_work in
> > arch/x86/kernel/cpu/mce/core.c.
> > It is really a BUG. I have submitted another patch to fix it:
> >
> That patch seems broken, what happens if mce_kill_me is added already,
> but it isn't the first work item in the list?
> --
> Jens Axboe