mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] signals: check_kill_permission: remove tasklist_lock
@ 2008-03-21 16:10 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2008-03-21 16:10 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Atsushi Tsuji, Eric W. Biederman, Roland McGrath, linux-kernel

Now that task_session() can't return a false NULL, check_kill_permission()
doesn't need tasklist_lock.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 25/kernel/signal.c~5_CKP_NO_TASKLIST	2008-03-19 21:15:30.000000000 +0300
+++ 25/kernel/signal.c	2008-03-21 18:10:30.000000000 +0300
@@ -551,9 +551,7 @@ static int check_kill_permission(int sig
 	    !capable(CAP_KILL)) {
 		switch (sig) {
 		case SIGCONT:
-			read_lock(&tasklist_lock);
 			sid = task_session(t);
-			read_unlock(&tasklist_lock);
 			/*
 			 * We don't return the error if sid == NULL. The
 			 * task was unhashed, the caller must notice this.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-21 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-21 16:10 [PATCH] signals: check_kill_permission: remove tasklist_lock Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®