diff options
author | Marc Dionne <marc.c.dionne@gmail.com> | 2009-09-14 07:46:23 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-09-14 19:10:59 -0400 |
commit | 5c84342a3e147a23752276650340801c237d0e56 (patch) | |
tree | a57a81dd9b48f8bd837ab13e319375c248cc7b89 /security/keys/keyctl.c | |
parent | 4a5d6ba1914d1bf1fcfb5e15834c29d84a879219 (diff) |
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 <marc.c.dionne@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/keys/keyctl.c')
-rw-r--r-- | security/keys/keyctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
1319 | already_same: | 1319 | already_same: |
1320 | ret = 0; | 1320 | ret = 0; |
1321 | not_permitted: | 1321 | not_permitted: |
1322 | write_unlock_irq(&tasklist_lock); | ||
1322 | put_cred(cred); | 1323 | put_cred(cred); |
1323 | return ret; | 1324 | return ret; |
1324 | 1325 | ||