]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] tty: Fix two reported pid leaks
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 18 Mar 2007 18:45:44 +0000 (12:45 -0600)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 18 Mar 2007 20:40:06 +0000 (13:40 -0700)
commitd9c1e9a8fff512bb6c43461181d4360f1c8cfd6d
treed77f4e779065c7d52a6b17cca5fb1a23fac505a7
parentaeb3f6d10ebfd5607f4bd3920b3b730a992ab82c
[PATCH] tty: Fix two reported pid leaks

These leaks were reported by: Catalin Marinas <catalin.marians@gmail.com>
and I have been able to very by inspection they are possible.

When converting tty_io.c to store pids as struct pid pointers instead
of pid_t values it appears I overlooked two places where we stop using
the pid value.  The very obvious one is in do_tty_hangup, and the one
the less obvious one in __proc_set_tty.

When looking into the code __proc_set_tty only has pids that need to
be put because of failures of other parts of the code to properly
perform hangup processing.   Fixing the leak here in __proc_set_tty
is easy and obviously correct so I am doing that first.

Fixing the places that should be performing hangup processing is much
less obviously correct.  So those I'm aiming those patches at -mm.
for now, so the can age a while before they are merged.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/tty_io.c