From: Marc Dionne Date: Mon, 14 Sep 2009 11:46:23 +0000 (+0100) Subject: KEYS: Unlock tasklist when exiting early from keyctl_session_to_parent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c84342a3e147a23752276650340801c237d0e56;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;