aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-12-21 09:54:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-12-21 09:54:00 -0800
commit04065c12072b6124475c7c4f6ad7484475a2f66e (patch)
treed16f36709fe220e98b63362ab82fa2244c060d03
parentd264dd3bbbd16b56239e889023fbe49413a58eaf (diff)
parent11933cf1d91d57da9e5c53822a540bbdc2656c16 (diff)
downloadpci-04065c12072b6124475c7c4f6ad7484475a2f66e.tar.gz
Merge tag 'fs.mount.propagation.fix.v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping
Pull mount propagation fix from Christian Brauner: "The propagate_mnt() function handles mount propagation when creating mounts and propagates the source mount tree @source_mnt to all applicable nodes of the destination propagation mount tree headed by @dest_mnt. Unfortunately it contains a bug where it fails to terminate at peers of @source_mnt when looking up copies of the source mount that become masters for copies of the source mount tree mounted on top of slaves in the destination propagation tree causing a NULL dereference. This fixes that bug (with a long commit message for a seven character fix but hopefully it'll help us fix issues faster in the future rather than having to go through the pain of having to relearn everything once more)" * tag 'fs.mount.propagation.fix.v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping: pnode: terminate at peers of source
-rw-r--r--fs/pnode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index 1106137c747a3a..468e4e65a615d7 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -244,7 +244,7 @@ static int propagate_one(struct mount *m)
}
do {
struct mount *parent = last_source->mnt_parent;
- if (last_source == first_source)
+ if (peers(last_source, first_source))
break;
done = parent->mnt_master == p;
if (done && peers(n, parent))