Quellcode durchsuchen

[PATCH] do_SAK: Don't recursively take the tasklist_lock

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>
Eric W. Biederman vor 19 Jahren
Ursprung
Commit
20ac94378d
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      drivers/char/tty_io.c

+ 1 - 1
drivers/char/tty_io.c

@@ -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;
 				}
 			}