diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-03-22 03:09:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 10:54:06 -0500 |
commit | bb0030797f55c9996ea1cebd16b65750ceb7e4fd (patch) | |
tree | 58256f9840bf05f141d986b6329a08e38065616a /security/keys | |
parent | 8aad38752e81d1d4de67e3d8e2524618ce7c9276 (diff) |
[PATCH] sem2mutex: security/
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: James Morris <jmorris@namei.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/process_keys.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index 74cb79eb917e..f6940618e345 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c | |||
@@ -16,11 +16,12 @@ | |||
16 | #include <linux/keyctl.h> | 16 | #include <linux/keyctl.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/mutex.h> | ||
19 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
20 | #include "internal.h" | 21 | #include "internal.h" |
21 | 22 | ||
22 | /* session keyring create vs join semaphore */ | 23 | /* session keyring create vs join semaphore */ |
23 | static DECLARE_MUTEX(key_session_sem); | 24 | static DEFINE_MUTEX(key_session_mutex); |
24 | 25 | ||
25 | /* the root user's tracking struct */ | 26 | /* the root user's tracking struct */ |
26 | struct key_user root_key_user = { | 27 | struct key_user root_key_user = { |
@@ -711,7 +712,7 @@ long join_session_keyring(const char *name) | |||
711 | } | 712 | } |
712 | 713 | ||
713 | /* allow the user to join or create a named keyring */ | 714 | /* allow the user to join or create a named keyring */ |
714 | down(&key_session_sem); | 715 | mutex_lock(&key_session_mutex); |
715 | 716 | ||
716 | /* look for an existing keyring of this name */ | 717 | /* look for an existing keyring of this name */ |
717 | keyring = find_keyring_by_name(name, 0); | 718 | keyring = find_keyring_by_name(name, 0); |
@@ -737,7 +738,7 @@ long join_session_keyring(const char *name) | |||
737 | key_put(keyring); | 738 | key_put(keyring); |
738 | 739 | ||
739 | error2: | 740 | error2: |
740 | up(&key_session_sem); | 741 | mutex_unlock(&key_session_mutex); |
741 | error: | 742 | error: |
742 | return ret; | 743 | return ret; |
743 | 744 | ||