From 77a9213cdfffb832584112517ccacff2030a6260 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 10 Feb 2020 11:17:40 -0800 Subject: [PATCH] drop cifs-fix-mode-bits-from-dir-listing-when-mounted-with-modefromsid.patch from 5.4 --- ...isting-when-mounted-with-modefromsid.patch | 52 ------------------- queue-5.4/series | 1 - 2 files changed, 53 deletions(-) delete mode 100644 queue-5.4/cifs-fix-mode-bits-from-dir-listing-when-mounted-with-modefromsid.patch diff --git a/queue-5.4/cifs-fix-mode-bits-from-dir-listing-when-mounted-with-modefromsid.patch b/queue-5.4/cifs-fix-mode-bits-from-dir-listing-when-mounted-with-modefromsid.patch deleted file mode 100644 index 3c781f9b966..00000000000 --- a/queue-5.4/cifs-fix-mode-bits-from-dir-listing-when-mounted-with-modefromsid.patch +++ /dev/null @@ -1,52 +0,0 @@ -From e3e056c35108661e418c803adfc054bf683426e7 Mon Sep 17 00:00:00 2001 -From: Aurelien Aptel -Date: Thu, 6 Feb 2020 18:16:55 +0100 -Subject: cifs: fix mode bits from dir listing when mounted with modefromsid - -From: Aurelien Aptel - -commit e3e056c35108661e418c803adfc054bf683426e7 upstream. - -When mounting with -o modefromsid, the mode bits are stored in an -ACE. Directory enumeration (e.g. ls -l /mnt) triggers an SMB Query Dir -which does not include ACEs in its response. The mode bits in this -case are silently set to a default value of 755 instead. - -This patch marks the dentry created during the directory enumeration -as needing re-evaluation (i.e. additional Query Info with ACEs) so -that the mode bits can be properly extracted. - -Quick repro: - -$ mount.cifs //win19.test/data /mnt -o ...,modefromsid -$ touch /mnt/foo && chmod 751 /mnt/foo -$ stat /mnt/foo - # reports 751 (OK) -$ sleep 2 - # dentry older than 1s by default get invalidated -$ ls -l /mnt - # since dentry invalid, ls does a Query Dir - # and reports foo as 755 (WRONG) - -Signed-off-by: Aurelien Aptel -Signed-off-by: Steve French -CC: Stable -Reviewed-by: Pavel Shilovsky -Signed-off-by: Greg Kroah-Hartman - ---- - fs/cifs/readdir.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/fs/cifs/readdir.c -+++ b/fs/cifs/readdir.c -@@ -174,7 +174,8 @@ cifs_fill_common_info(struct cifs_fattr - * may look wrong since the inodes may not have timed out by the time - * "ls" does a stat() call on them. - */ -- if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) -+ if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) || -+ (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID)) - fattr->cf_flags |= CIFS_FATTR_NEED_REVAL; - - if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL && diff --git a/queue-5.4/series b/queue-5.4/series index a7b1300ac5e..9682b0de1cc 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -300,7 +300,6 @@ kvm-nvmx-vmread-should-not-set-rflags-to-specify-suc.patch kvm-use-vcpu-specific-gva-hva-translation-when-query.patch kvm-play-nice-with-read-only-memslots-when-querying-.patch cifs-fail-i-o-on-soft-mounts-if-sessionsetup-errors-out.patch -cifs-fix-mode-bits-from-dir-listing-when-mounted-with-modefromsid.patch x86-apic-msi-plug-non-maskable-msi-affinity-race.patch clocksource-prevent-double-add_timer_on-for-watchdog_timer.patch perf-core-fix-mlock-accounting-in-perf_mmap.patch -- 2.47.3