]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
[PATCH] do_SAK: Don't recursively take the tasklist_lock
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 13 Apr 2006 10:49:07 +0000 (04:49 -0600)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 13 Apr 2006 18:59:12 +0000 (11:59 -0700)
By calling send_sig do_SAK is recursively taking the
tasklist_lock, which is silly.

In addition I just audited the kernel and this was the only
place where tasklist_lock is taken inside of task_lock.

So this one line change is a general worthwhile cleanup and
it increases our options on how to fix the ptrace_attach races.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/tty_io.c

index f70a47eadb52abcacb891a816aa55db988889db6..841f0bd3eaaf8426194c8cd838c1a0dfb67f37cc 100644 (file)
@@ -2734,7 +2734,7 @@ static void __do_SAK(void *arg)
                                        printk(KERN_NOTICE "SAK: killed process %d"
                                            " (%s): fd#%d opened to the tty\n",
                                            p->pid, p->comm, i);
-                                       send_sig(SIGKILL, p, 1);
+                                       force_sig(SIGKILL, p);
                                        break;
                                }
                        }