From: Greg Kroah-Hartman Date: Tue, 8 Apr 2025 09:11:14 +0000 (+0200) Subject: 6.14-stable patches X-Git-Tag: v5.4.292~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b7a77eb0c9ee4ad67c9a9418b960385a038fa3b;p=thirdparty%2Fkernel%2Fstable-queue.git 6.14-stable patches added patches: bcachefs-bch2_ioctl_subvolume_destroy-fixes.patch --- diff --git a/queue-6.14/bcachefs-bch2_ioctl_subvolume_destroy-fixes.patch b/queue-6.14/bcachefs-bch2_ioctl_subvolume_destroy-fixes.patch new file mode 100644 index 0000000000..3592c5075e --- /dev/null +++ b/queue-6.14/bcachefs-bch2_ioctl_subvolume_destroy-fixes.patch @@ -0,0 +1,38 @@ +From 02a22be3c0003af08df510cba3d79d00c6495b74 Mon Sep 17 00:00:00 2001 +From: Kent Overstreet +Date: Sat, 29 Mar 2025 19:01:09 -0400 +Subject: bcachefs: bch2_ioctl_subvolume_destroy() fixes + +From: Kent Overstreet + +[ Upstream commit 707549600c4a012ed71c0204a7992a679880bf33 ] + +bch2_evict_subvolume_inodes() was getting stuck - due to incorrectly +pruning the dcache. + +Also, fix missing permissions checks. + +Reported-by: Alexander Viro +Signed-off-by: Kent Overstreet +Signed-off-by: Greg Kroah-Hartman +--- + fs/bcachefs/fs-ioctl.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/fs/bcachefs/fs-ioctl.c ++++ b/fs/bcachefs/fs-ioctl.c +@@ -515,10 +515,12 @@ static long bch2_ioctl_subvolume_destroy + ret = -ENOENT; + goto err; + } +- ret = __bch2_unlink(dir, victim, true); ++ ++ ret = inode_permission(file_mnt_idmap(filp), d_inode(victim), MAY_WRITE) ?: ++ __bch2_unlink(dir, victim, true); + if (!ret) { + fsnotify_rmdir(dir, victim); +- d_delete(victim); ++ d_invalidate(victim); + } + err: + inode_unlock(dir); diff --git a/queue-6.14/series b/queue-6.14/series index 80915c12db..4ce5b24d6e 100644 --- a/queue-6.14/series +++ b/queue-6.14/series @@ -678,3 +678,4 @@ ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch perf-x86-intel-apply-static-call-for-drain_pebs.patch perf-x86-intel-avoid-disable-pmu-if-cpuc-enabled-in-sample-read.patch uprobes-x86-harden-uretprobe-syscall-trampoline-check.patch +bcachefs-bch2_ioctl_subvolume_destroy-fixes.patch