Re: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31

From: James Morris (
Date: Fri Aug 16 2002 - 10:59:58 EST

On Fri, 16 Aug 2002, Jeff Dike wrote:

> This introduces a window within which SIGIO will be dropped.


> As it stands, this will break UML. Lost SIGIOs will cause UML hangs.


> If you're determined to avoid spinlocks, why not do something like this:
> + if (!pid)
> + return;
> + while(fown->pid == PID_INVALID) ;
> maybe with a cpu_relax() in the loop.
> But that starts looking a lot like a spinlock.

Although it should be better at not hurting the common case (no
contention), as f_setown() calls should be rare occurences in comparison
to normal SIGIO generation.

> Also, shouldn't there be a capable(CAP_KILL) in here rather than a check
> for uid == 0?

CAP_KILL was only previously used for sockets when calling F_SETOWN and
FIOSETOWN, and was not checked during delivery. The cleanup just brings
sockets into line with ttys, futexes and directories. It may be a good
idea, but probably out of scope of this cleanup.

- James

James Morris

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:12 EST