mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
tty: release_one_tty() forgets to put pids
commit 6da8d866d0 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>
This commit is contained in:
parent
fae08fb3f9
commit
e2278e63b1
|
|
@ -1408,6 +1408,8 @@ static void release_one_tty(struct work_struct *work)
|
|||
list_del_init(&tty->tty_files);
|
||||
file_list_unlock();
|
||||
|
||||
put_pid(tty->pgrp);
|
||||
put_pid(tty->session);
|
||||
free_tty_struct(tty);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user