[lkml]   [2002]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Moving fasync_struct into struct file?
Rusty Russell <> 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-> 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]


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

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