From 5c84342a3e147a23752276650340801c237d0e56 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Mon, 14 Sep 2009 12:46:23 +0100 Subject: KEYS: Unlock tasklist when exiting early from keyctl_session_to_parent When we exit early from keyctl_session_to_parent because of permissions or because the session keyring is the same as the parent, we need to unlock the tasklist. The missing unlock causes the system to hang completely when using keyctl(KEYCTL_SESSION_TO_PARENT) with a keyring shared with the parent. Signed-off-by: Marc Dionne Signed-off-by: David Howells Signed-off-by: James Morris --- security/keys/keyctl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'security') diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 74c968524592..60983f38852e 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -1319,6 +1319,7 @@ long keyctl_session_to_parent(void) already_same: ret = 0; not_permitted: + write_unlock_irq(&tasklist_lock); put_cred(cred); return ret; -- cgit v1.2.2