aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-05-21 07:32:13 -0400
committerJames Morris <james.l.morris@oracle.com>2012-05-25 06:51:42 -0400
commit423b9788023263364ea5de04189f02bd9b6a12db (patch)
treefc3ee4814aa8322fb2abb01c50d96568aa51bd9b /security/keys/internal.h
parentff2bb047c4bce9742e94911eeb44b4d6ff4734ab (diff)
KEYS: Fix some sparse warnings
Fix some sparse warnings in the keyrings code: (1) compat_keyctl_instantiate_key_iov() should be static. (2) There were a couple of places where a pointer was being compared against integer 0 rather than NULL. (3) keyctl_instantiate_key_common() should not take a __user-labelled iovec pointer as the caller must have copied the iovec to kernel space. (4) __key_link_begin() takes and __key_link_end() releases keyring_serialise_link_sem under some circumstances and so this should be declared. Note that adding __acquires() and __releases() for this doesn't help cure the warnings messages - something only commenting out both helps. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security/keys/internal.h')
-rw-r--r--security/keys/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/internal.h b/security/keys/internal.h
index f711b094ed41..f173be2ce3ea 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -240,7 +240,7 @@ extern long keyctl_instantiate_key_iov(key_serial_t,
240extern long keyctl_invalidate_key(key_serial_t); 240extern long keyctl_invalidate_key(key_serial_t);
241 241
242extern long keyctl_instantiate_key_common(key_serial_t, 242extern long keyctl_instantiate_key_common(key_serial_t,
243 const struct iovec __user *, 243 const struct iovec *,
244 unsigned, size_t, key_serial_t); 244 unsigned, size_t, key_serial_t);
245 245
246/* 246/*