tty: release_one_tty() forgets to put pids
commite2278e63b10b17980dcbc01e24fe0619f4b38bfd
authorOleg Nesterov <oleg@redhat.com>
Fri, 2 Apr 2010 16:05:12 +0000 (2 18:05 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:41:18 +0000 (26 07:41 -0700)
treec77c545d006d354e606ffa8dc0205b8cfa85ed8a
parentfae08fb3f91a4e2e1034a89e0504a778bb5a4634
tty: release_one_tty() forgets to put pids

commit 6da8d866d0d39e9509ff826660f6a86a6757c966 upstream.

release_one_tty(tty) can be called when tty still has a reference
to pgrp/session. In this case we leak the pid.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tty_io.c