Loading fs/fuse/dev.c +33 −26 Original line number Diff line number Diff line Loading @@ -2251,17 +2251,14 @@ static int fuse_device_clone(struct fuse_conn *fc, struct file *new) return 0; } static long fuse_dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long fuse_dev_ioctl_clone(struct file *file, __u32 __user *argp) { int res; int oldfd; struct fuse_dev *fud = NULL; struct fd f; switch (cmd) { case FUSE_DEV_IOC_CLONE: if (get_user(oldfd, (__u32 __user *)arg)) if (get_user(oldfd, argp)) return -EFAULT; f = fdget(oldfd); Loading @@ -2281,13 +2278,23 @@ static long fuse_dev_ioctl(struct file *file, unsigned int cmd, res = fuse_device_clone(fud->fc, file); mutex_unlock(&fuse_mutex); } fdput(f); break; return res; } static long fuse_dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; switch (cmd) { case FUSE_DEV_IOC_CLONE: return fuse_dev_ioctl_clone(file, argp); default: res = -ENOTTY; break; return -ENOTTY; } return res; } const struct file_operations fuse_dev_operations = { Loading Loading
fs/fuse/dev.c +33 −26 Original line number Diff line number Diff line Loading @@ -2251,17 +2251,14 @@ static int fuse_device_clone(struct fuse_conn *fc, struct file *new) return 0; } static long fuse_dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long fuse_dev_ioctl_clone(struct file *file, __u32 __user *argp) { int res; int oldfd; struct fuse_dev *fud = NULL; struct fd f; switch (cmd) { case FUSE_DEV_IOC_CLONE: if (get_user(oldfd, (__u32 __user *)arg)) if (get_user(oldfd, argp)) return -EFAULT; f = fdget(oldfd); Loading @@ -2281,13 +2278,23 @@ static long fuse_dev_ioctl(struct file *file, unsigned int cmd, res = fuse_device_clone(fud->fc, file); mutex_unlock(&fuse_mutex); } fdput(f); break; return res; } static long fuse_dev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; switch (cmd) { case FUSE_DEV_IOC_CLONE: return fuse_dev_ioctl_clone(file, argp); default: res = -ENOTTY; break; return -ENOTTY; } return res; } const struct file_operations fuse_dev_operations = { Loading