summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-06-20 22:46:55 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-06-29 18:13:41 -0400
commitffdc52fbbd5835a936ad683c943d6d103a2d4514 (patch)
tree00a19484748f184cbcd8c69ba757c63a7cca9b57 /scripts/lib/kdoc/kdoc_files.py
parent431cc1d8e2dab751b2b8f298a6d9caf83d8b49c3 (diff)
prevent mount hash conflicts
Currently it's still possible to run into a pathological situation when two hashed mounts share both parent and mountpoint. That does not work well, for obvious reasons. We are not far from getting rid of that; the only remaining gap is attach_recursive_mnt() not being careful enough when sliding a tree under existing mount (for propagated copies or in 'beneath' case for the original one). To deal with that cleanly we need to be able to find overmounts (i.e. mounts on top of parent's root); we could do hash lookups or scan the list of children but either would be costly. Since one of the results we get from that will be prevention of multiple parallel overmounts, let's just bite the bullet and store a (non-counting) reference to overmount in struct mount. With that done, closing the hole in attach_recursive_mnt() becomes easy - we just need to follow the chain of overmounts before we change the mountpoint of the mount we are sliding things under. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions