Prev: [16/24] clockevent: Prevent dead lock on clockevents_lock
Next: [08/24] ext4: Use tag dirty lookup during mpage_da_submit_io
From: Greg KH on 24 May 2010 18:50 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Oleg Nesterov <oleg(a)redhat.com> 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(a)redhat.com> Reported-by: Catalin Marinas <catalin.marinas(a)arm.com> Reported-and-tested-by: Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp> Acked-by: Linus Torvalds <torvalds(a)linux-foundation.org> Acked-by: Eric W. Biederman <ebiederm(a)xmission.com> Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/char/tty_io.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1893,6 +1893,8 @@ static void release_one_tty(struct tty_s list_del_init(&tty->tty_files); file_list_unlock(); + put_pid(tty->pgrp); + put_pid(tty->session); free_tty_struct(tty); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |