]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - security/keys/keyctl.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[karo-tx-linux.git] / security / keys / keyctl.c
index 7c72baa02f2e93ff09c76be260201da3315e32e5..09796797d122f7a624fb35584e00a67a07b8d4a9 100644 (file)
@@ -838,11 +838,11 @@ static long get_instantiation_keyring(key_serial_t ringid,
 {
        key_ref_t dkref;
 
+       *_dest_keyring = NULL;
+
        /* just return a NULL pointer if we weren't asked to make a link */
-       if (ringid == 0) {
-               *_dest_keyring = NULL;
+       if (ringid == 0)
                return 0;
-       }
 
        /* if a specific keyring is nominated by ID, then use that */
        if (ringid > 0) {
@@ -1294,7 +1294,7 @@ asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3,
 
        case KEYCTL_GET_SECURITY:
                return keyctl_get_security((key_serial_t) arg2,
-                                          (char *) arg3,
+                                          (char __user *) arg3,
                                           (size_t) arg4);
 
        default: