Moving fasync_struct into struct file?

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Tue Feb 19 2002 - 02:18:12 EST


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.

        This means we need a move the "struct fasync_struct
fasync_list" into struct file (up from all the subsystems which use
it, eg. struct socket).

See any problems with this?
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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