diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 21:49:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 21:49:06 -0400 |
commit | e05644e17e744315bce12b0948cdc36910b9a76e (patch) | |
tree | 92d62ff59c57f991ef6b5c3cc2c2dcd205946a11 /security/keys | |
parent | 97e7292ab5ccd30a13c3612835535fc3f3e59715 (diff) | |
parent | 663728418e3494f8e4a82f5d1b2f23c22d11be35 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"Nothing groundbreaking for this kernel, just cleanups and fixes, and a
couple of Smack enhancements."
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (21 commits)
Smack: Maintainer Record
Smack: don't show empty rules when /smack/load or /smack/load2 is read
Smack: user access check bounds
Smack: onlycap limits on CAP_MAC_ADMIN
Smack: fix smack_new_inode bogosities
ima: audit is compiled only when enabled
ima: ima_initialized is set only if successful
ima: add policy for pseudo fs
ima: remove unused cleanup functions
ima: free securityfs violations file
ima: use full pathnames in measurement list
security: Fix nommu build.
samples: seccomp: add .gitignore for untracked executables
tpm: check the chip reference before using it
TPM: fix memleak when register hardware fails
TPM: chip disabled state erronously being reported as error
MAINTAINERS: TPM maintainers' contacts update
Merge branches 'next-queue' and 'next' into next
Remove unused code from MPI library
Revert "crypto: GnuPG based MPI lib - additional sources (part 4)"
...
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/compat.c | 4 | ||||
-rw-r--r-- | security/keys/internal.h | 2 | ||||
-rw-r--r-- | security/keys/keyctl.c | 2 | ||||
-rw-r--r-- | security/keys/keyring.c | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/security/keys/compat.c b/security/keys/compat.c index c92d42b021aa..1c261763f479 100644 --- a/security/keys/compat.c +++ b/security/keys/compat.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * | 24 | * |
25 | * If successful, 0 will be returned. | 25 | * If successful, 0 will be returned. |
26 | */ | 26 | */ |
27 | long compat_keyctl_instantiate_key_iov( | 27 | static long compat_keyctl_instantiate_key_iov( |
28 | key_serial_t id, | 28 | key_serial_t id, |
29 | const struct compat_iovec __user *_payload_iov, | 29 | const struct compat_iovec __user *_payload_iov, |
30 | unsigned ioc, | 30 | unsigned ioc, |
@@ -33,7 +33,7 @@ long compat_keyctl_instantiate_key_iov( | |||
33 | struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; | 33 | struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; |
34 | long ret; | 34 | long ret; |
35 | 35 | ||
36 | if (_payload_iov == 0 || ioc == 0) | 36 | if (!_payload_iov || !ioc) |
37 | goto no_payload; | 37 | goto no_payload; |
38 | 38 | ||
39 | ret = compat_rw_copy_check_uvector(WRITE, _payload_iov, ioc, | 39 | ret = compat_rw_copy_check_uvector(WRITE, _payload_iov, ioc, |
diff --git a/security/keys/internal.h b/security/keys/internal.h index c246ba5d43ab..22ff05269e3d 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h | |||
@@ -242,7 +242,7 @@ extern long keyctl_instantiate_key_iov(key_serial_t, | |||
242 | extern long keyctl_invalidate_key(key_serial_t); | 242 | extern long keyctl_invalidate_key(key_serial_t); |
243 | 243 | ||
244 | extern long keyctl_instantiate_key_common(key_serial_t, | 244 | extern long keyctl_instantiate_key_common(key_serial_t, |
245 | const struct iovec __user *, | 245 | const struct iovec *, |
246 | unsigned, size_t, key_serial_t); | 246 | unsigned, size_t, key_serial_t); |
247 | 247 | ||
248 | /* | 248 | /* |
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index f1b59ae39d7e..3364fbf46807 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
@@ -1106,7 +1106,7 @@ long keyctl_instantiate_key_iov(key_serial_t id, | |||
1106 | struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; | 1106 | struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; |
1107 | long ret; | 1107 | long ret; |
1108 | 1108 | ||
1109 | if (_payload_iov == 0 || ioc == 0) | 1109 | if (!_payload_iov || !ioc) |
1110 | goto no_payload; | 1110 | goto no_payload; |
1111 | 1111 | ||
1112 | ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc, | 1112 | ret = rw_copy_check_uvector(WRITE, _payload_iov, ioc, |
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 7445875f6818..81e7852d281d 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c | |||
@@ -751,6 +751,7 @@ static void keyring_unlink_rcu_disposal(struct rcu_head *rcu) | |||
751 | int __key_link_begin(struct key *keyring, const struct key_type *type, | 751 | int __key_link_begin(struct key *keyring, const struct key_type *type, |
752 | const char *description, unsigned long *_prealloc) | 752 | const char *description, unsigned long *_prealloc) |
753 | __acquires(&keyring->sem) | 753 | __acquires(&keyring->sem) |
754 | __acquires(&keyring_serialise_link_sem) | ||
754 | { | 755 | { |
755 | struct keyring_list *klist, *nklist; | 756 | struct keyring_list *klist, *nklist; |
756 | unsigned long prealloc; | 757 | unsigned long prealloc; |
@@ -960,6 +961,7 @@ void __key_link(struct key *keyring, struct key *key, | |||
960 | void __key_link_end(struct key *keyring, struct key_type *type, | 961 | void __key_link_end(struct key *keyring, struct key_type *type, |
961 | unsigned long prealloc) | 962 | unsigned long prealloc) |
962 | __releases(&keyring->sem) | 963 | __releases(&keyring->sem) |
964 | __releases(&keyring_serialise_link_sem) | ||
963 | { | 965 | { |
964 | BUG_ON(type == NULL); | 966 | BUG_ON(type == NULL); |
965 | BUG_ON(type->name == NULL); | 967 | BUG_ON(type->name == NULL); |