VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Ian Abbott <abbotti@mev.co.uk> 2019-04-24 15:14:11 +0100 committer: Miklos Szeredi <mszeredi@redhat.com> 2019-04-24 17:05:07 +0200 commit: 6407f44aaf2a39b5ccbb1cc1d342b906dcfa8a87 parent: 29cc02d949b19fdeba9de9f54b2641005f5865c6
Commit Summary:
fuse: Add ioctl flag for x32 compat ioctl
Diffstat:
1 file changed, 6 insertions, 1 deletion
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 1f9da7a5ad0d..3959f08279e6 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2578,8 +2578,13 @@ long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
 #if BITS_PER_LONG == 32
 	inarg.flags |= FUSE_IOCTL_32BIT;
 #else
-	if (flags & FUSE_IOCTL_COMPAT)
+	if (flags & FUSE_IOCTL_COMPAT) {
 		inarg.flags |= FUSE_IOCTL_32BIT;
+#ifdef CONFIG_X86_X32
+		if (in_x32_syscall())
+			inarg.flags |= FUSE_IOCTL_COMPAT_X32;
+#endif
+	}
 #endif
 
 	/* assume all the iovs returned by client always fits in a page */