From: Marc Dionne <marc.c.dionne@gmail.com>
To: David Howells <dhowells@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] KEYS: unlock tasklist when exiting early from keyctl_session_to_parent
Date: Sat, 12 Sep 2009 14:13:52 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0909121347400.4263@tornado> (raw)
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>
---
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 74c9685..60983f3 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;
--
1.6.4.2
next reply other threads:[~2009-09-12 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-12 18:13 Marc Dionne [this message]
2009-09-14 11:46 [PATCH] KEYS: Unlock " David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0909121347400.4263@tornado \
--to=marc.c.dionne@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®