Rusty Russell <rusty@rustcorp.com.au> writes:
> Hi guys,
>
> Stephen Rothwell pointed out that if you set up SIGIO from an
> fd, fork, and exit, and PIDs wrap, the new process may be clobbered by
> the SIGIO. IMVHO the best way to clean this up is to check the
> fasync_list in sys_close, and if pid == filp->f_owner.pid and fd ==
> fasync_list->fa_fd, unregister the SIGIO.
The pid/owner checking at setup time is very broken anyways. Consider a
threaded application that wants to set up SIGIO from one thread but receive
from another. It has to be root currently to do that.
Best would be to never check anything in F_SETOWN, but just save the
uid/pid/gid and always check at signal sending time.
[in addition sk->proc should go and use the fasync list, but that is a
different thing for now]
-Andi
-
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/
This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:18 EST