Message ID | 20190605194845.926-2-sean.j.christopherson@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/sgx: Clean up and enhance add pages ioctl | expand |
diff --git a/arch/x86/kernel/cpu/sgx/driver/ioctl.c b/arch/x86/kernel/cpu/sgx/driver/ioctl.c index a27ec26a9350..cc057d487499 100644 --- a/arch/x86/kernel/cpu/sgx/driver/ioctl.c +++ b/arch/x86/kernel/cpu/sgx/driver/ioctl.c @@ -839,11 +839,5 @@ long sgx_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) if (copy_from_user(data, (void __user *)arg, _IOC_SIZE(cmd))) return -EFAULT; - ret = handler(filep, cmd, (unsigned long)((void *)data)); - if (!ret && (cmd & IOC_OUT)) { - if (copy_to_user((void __user *)arg, data, _IOC_SIZE(cmd))) - return -EFAULT; - } - - return ret; + return handler(filep, cmd, (unsigned long)((void *)data)); }
There are currently no SGX ioctls that require writing data back to userspace. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- arch/x86/kernel/cpu/sgx/driver/ioctl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)