Re: BUG? "Call fasync() functions without the BKL" is racy

From: Oleg Nesterov
Date: Thu Dec 04 2008 - 09:35:52 EST

On 12/03, Jonathan Corbet wrote:
> On Wed, 03 Dec 2008 22:21:02 +0100
> Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
> > > Serioulsy, I think the best (partial, yes) fix for now is to restore
> > > lock_kernel() in setfl() and change ioctl_fioxxx() accordingly.
> > > At least this protect us from tty too.
> >
> > For 2.6.28 I agree.
> OK, what do you all think of the following? It returns fcntl.c to its
> previous state, and adds locking in fs/ioctl.c. It's worth noting that
> ioctl_fioasync() has always been racy in exactly the same way.

Yes, I agree with you and Andi, imho this is what we need for 2.6.28.

Thanks Jonathan!


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at