]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tty: fix race in tty_fasync
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Dec 2009 15:07:19 +0000 (07:07 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:20:28 +0000 (15:20 -0800)
commit76c5f486172fd061715f21c926d61f7e83ea6377
treeb3cc11c76274ddeb4457d8457a144c94947618be
parent951e8ab57d5a08fd083997e5bf674c3d0e81abff
tty: fix race in tty_fasync

commit 703625118069f9f8960d356676662d3db5a9d116 upstream.

We need to keep the lock held over the call to __f_setown() to
prevent a PID race.

Thanks to Al Viro for pointing out the problem, and to Travis for
making us look here in the first place.

Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tavis Ormandy <taviso@google.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Julien Tinnes <jln@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tty_io.c