]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Dec 2022 09:47:08 +0000 (10:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Dec 2022 09:47:08 +0000 (10:47 +0100)
added patches:
fuse-always-revalidate-if-exclusive-create.patch

queue-5.10/fuse-always-revalidate-if-exclusive-create.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/fuse-always-revalidate-if-exclusive-create.patch b/queue-5.10/fuse-always-revalidate-if-exclusive-create.patch
new file mode 100644 (file)
index 0000000..d0a033a
--- /dev/null
@@ -0,0 +1,34 @@
+From df8629af293493757beccac2d3168fe5a315636e Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Wed, 11 Nov 2020 17:22:32 +0100
+Subject: fuse: always revalidate if exclusive create
+
+From: Miklos Szeredi <mszeredi@redhat.com>
+
+commit df8629af293493757beccac2d3168fe5a315636e upstream.
+
+Failure to do so may result in EEXIST even if the file only exists in the
+cache and not in the filesystem.
+
+The atomic nature of O_EXCL mandates that the cached state should be
+ignored and existence verified anew.
+
+Reported-by: Ken Schalk <kschalk@nvidia.com>
+Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
+Signed-off-by: Wu Bo <bo.wu@vivo.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/fuse/dir.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/fuse/dir.c
++++ b/fs/fuse/dir.c
+@@ -205,7 +205,7 @@ static int fuse_dentry_revalidate(struct
+       if (inode && fuse_is_bad(inode))
+               goto invalid;
+       else if (time_before64(fuse_dentry_time(entry), get_jiffies_64()) ||
+-               (flags & LOOKUP_REVAL)) {
++               (flags & (LOOKUP_EXCL | LOOKUP_REVAL))) {
+               struct fuse_entry_out outarg;
+               FUSE_ARGS(args);
+               struct fuse_forget_link *forget;
index 18d71b95e4250ae9b4abc097196fe6f925c3a86e..fdf16de22e5d07aba70ee5e47543d7acd104c54c 100644 (file)
@@ -2,3 +2,4 @@ x86-smpboot-move-rcu_cpu_starting-earlier.patch
 vfs-fix-copy_file_range-regression-in-cross-fs-copies.patch
 vfs-fix-copy_file_range-averts-filesystem-freeze-protection.patch
 nfp-fix-use-after-free-in-area_cache_get.patch
+fuse-always-revalidate-if-exclusive-create.patch