Re: pipes && EPOLLET, again

From: Linus Torvalds
Date: Tue Mar 04 2025 - 14:50:00 EST


On Tue, 4 Mar 2025 at 09:32, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> I agree that my test case is "buggy", but afaics it is not buggier than
> userspace programs which rely on the unconditional kill_fasync()'s in
> pipe_read/pipe_write?

I'm not convinced any such users actually exist.

The reason kill_fasync() is unconditional is that it's cheap. The
normal situation is "nobody there", and we test that without any
locking.

So we've never bothered to make any changes to that path, and there's
never been any real reason to have any "was_empty" like conditionals.

Linus