local64.h: make <asm/local64.h> mandatory
[linux-2.6-microblaze.git] / security / keys / compat.c
index 6ee9d8f..1545efd 100644 (file)
 #include <linux/slab.h>
 #include "internal.h"
 
-/*
- * Instantiate a key with the specified compatibility multipart payload and
- * link the key into the destination keyring if one is given.
- *
- * The caller must have the appropriate instantiation permit set for this to
- * work (see keyctl_assume_authority).  No other permissions are required.
- *
- * If successful, 0 will be returned.
- */
-static long compat_keyctl_instantiate_key_iov(
-       key_serial_t id,
-       const struct compat_iovec __user *_payload_iov,
-       unsigned ioc,
-       key_serial_t ringid)
-{
-       struct iovec iovstack[UIO_FASTIOV], *iov = iovstack;
-       struct iov_iter from;
-       long ret;
-
-       if (!_payload_iov)
-               ioc = 0;
-
-       ret = compat_import_iovec(WRITE, _payload_iov, ioc,
-                                 ARRAY_SIZE(iovstack), &iov,
-                                 &from);
-       if (ret < 0)
-               return ret;
-
-       ret = keyctl_instantiate_key_common(id, &from, ringid);
-       kfree(iov);
-       return ret;
-}
-
 /*
  * The key control system call, 32-bit compatibility version for 64-bit archs
  */
@@ -114,8 +81,8 @@ COMPAT_SYSCALL_DEFINE5(keyctl, u32, option,
                return keyctl_reject_key(arg2, arg3, arg4, arg5);
 
        case KEYCTL_INSTANTIATE_IOV:
-               return compat_keyctl_instantiate_key_iov(
-                       arg2, compat_ptr(arg3), arg4, arg5);
+               return keyctl_instantiate_key_iov(arg2, compat_ptr(arg3), arg4,
+                                                 arg5);
 
        case KEYCTL_INVALIDATE:
                return keyctl_invalidate_key(arg2);