Re: possible deadlock in aio_poll

From: Miklos Szeredi
Date: Tue Sep 11 2018 - 03:20:48 EST


On Tue, Sep 11, 2018 at 8:33 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Mon, Sep 10, 2018 at 08:14:20PM +0200, Miklos Szeredi wrote:
>> Why do pollable waitqueues need to disable interrupts generally?
>
> Any waitqueue needs to disable interrupts for consistency. We
> always use spin_lock_irqsave in __wake_up_common_lock() for example.

There are the _locked (non _irq) variants that do not.

And poll/select/etc don't impose non-interuptibility on wakeups
either. So it looks like it's just aio that has weird spin lock
dependencies that forces this requirement on a waitq used in ->poll().

Thanks,
Miklos