Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-12 22:18:26 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-12 22:21:19 +0100
commitc0245fb67d9e3e5ead14e79de210ffd1f80ead0c (patch)
tree5549ff8616daecc79b44d37da7e96ed535cd82fa
parent14f66f54ae367948d8167423e7407429ea0a6826 (diff)
cuse: fix ioctl (bnc#1012628).
-rw-r--r--patches.kernel.org/4.20.8-314-cuse-fix-ioctl.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.8-314-cuse-fix-ioctl.patch b/patches.kernel.org/4.20.8-314-cuse-fix-ioctl.patch
new file mode 100644
index 0000000000..ac93b6282c
--- /dev/null
+++ b/patches.kernel.org/4.20.8-314-cuse-fix-ioctl.patch
@@ -0,0 +1,45 @@
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Wed, 16 Jan 2019 10:27:59 +0100
+Subject: [PATCH] cuse: fix ioctl
+References: bnc#1012628
+Patch-mainline: 4.20.8
+Git-commit: 8a3177db59cd644fde05ba9efee29392dfdec8aa
+
+commit 8a3177db59cd644fde05ba9efee29392dfdec8aa upstream.
+
+cuse_process_init_reply() doesn't initialize fc->max_pages and thus all
+cuse bases ioctls fail with ENOMEM.
+
+Reported-by: Andreas Steinmetz <ast@domdv.de>
+Fixes: 5da784cce430 ("fuse: add max_pages to init_out")
+Cc: <stable@vger.kernel.org> # v4.20
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ fs/fuse/inode.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
+index 568abed20eb2..a7f922a67c69 100644
+--- a/fs/fuse/inode.c
++++ b/fs/fuse/inode.c
+@@ -628,6 +628,7 @@ void fuse_conn_init(struct fuse_conn *fc, struct user_namespace *user_ns)
+ get_random_bytes(&fc->scramble_key, sizeof(fc->scramble_key));
+ fc->pid_ns = get_pid_ns(task_active_pid_ns(current));
+ fc->user_ns = get_user_ns(user_ns);
++ fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ;
+ }
+ EXPORT_SYMBOL_GPL(fuse_conn_init);
+
+@@ -1162,7 +1163,6 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
+ fc->user_id = d.user_id;
+ fc->group_id = d.group_id;
+ fc->max_read = max_t(unsigned, 4096, d.max_read);
+- fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ;
+
+ /* Used by get_root_inode() */
+ sb->s_fs_info = fc;
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index f759f5f141..67845b5f23 100644
--- a/series.conf
+++ b/series.conf
@@ -1050,6 +1050,7 @@
patches.kernel.org/4.20.8-311-fuse-call-pipe_buf_release-under-pipe-lock.patch
patches.kernel.org/4.20.8-312-fuse-decrement-NR_WRITEBACK_TEMP-on-the-right-.patch
patches.kernel.org/4.20.8-313-fuse-handle-zero-sized-retrieve-correctly.patch
+ patches.kernel.org/4.20.8-314-cuse-fix-ioctl.patch
########################################################
# Build fixes that apply to the vanilla kernel too.