> This introduces a window within which SIGIO will be dropped.
Yes.
> As it stands, this will break UML. Lost SIGIOs will cause UML hangs.
Ugh.
>
> 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 <jmorris@intercode.com.au>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/