lkml.org 
[lkml]   [2002]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] sigurg/sigio cleanup for 2.5.31
On Fri, 16 Aug 2002, Jeff Dike wrote:

> 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/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.141 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site