]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.33 stuff
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Apr 2010 23:48:13 +0000 (16:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Apr 2010 23:48:13 +0000 (16:48 -0700)
queue-2.6.33/series
queue-2.6.33/tty-release_one_tty-forgets-to-put-pids.patch [new file with mode: 0644]

index 8e2a8ca5eb2b27d8ba9e9adc6590068be83908e5..d7a64dcb963451df0d4195dba1a5b525d2506b29 100644 (file)
@@ -26,3 +26,4 @@ sunxvr500-ignore-secondary-output-pci-devices.patch
 watchdog-hpwdt-fix-lower-timeout-limit.patch
 watchdog-itco_wdt-tco-watchdog-patch-for-additional-intel-cougar-point-deviceids.patch
 genirq-force-msi-irq-handlers-to-run-with-interrupts-disabled.patch
+tty-release_one_tty-forgets-to-put-pids.patch
diff --git a/queue-2.6.33/tty-release_one_tty-forgets-to-put-pids.patch b/queue-2.6.33/tty-release_one_tty-forgets-to-put-pids.patch
new file mode 100644 (file)
index 0000000..f7cca3a
--- /dev/null
@@ -0,0 +1,35 @@
+From 6da8d866d0d39e9509ff826660f6a86a6757c966 Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Fri, 2 Apr 2010 18:05:12 +0200
+Subject: tty: release_one_tty() forgets to put pids
+
+From: Oleg Nesterov <oleg@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@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 |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
+@@ -1423,6 +1423,8 @@ static void release_one_tty(struct work_
+       list_del_init(&tty->tty_files);
+       file_list_unlock();
++      put_pid(tty->pgrp);
++      put_pid(tty->session);
+       free_tty_struct(tty);
+ }