Skip to contentSkip to conversation

signals: check_kill_permission: remove tasklist_lock

PATCH New Oleg Nesterov 1 participant 1 message Mar 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 signals: check_kill_permission: remove tasklist_lock

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

kernel/signal.c renamed from kernel/signal.c~5_CKP_NO_TASKLIST +0 -2
@@ -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.