aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/filesystems/kernfs_test.c
diff options
context:
space:
mode:
authorAl Viro <[email protected]>2025-08-15 19:38:14 +0000
committerAl Viro <[email protected]>2025-08-19 15:58:18 +0000
commit0ddfb62f5d018edcb571a3d8ea30ad5332cf2a69 (patch)
tree0ebcb9ab807cebd06512f8ec89956c56c94882c1 /tools/testing/selftests/filesystems/kernfs_test.c
parentMerge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
downloadkernel-0ddfb62f5d018edcb571a3d8ea30ad5332cf2a69.tar.gz
kernel-0ddfb62f5d018edcb571a3d8ea30ad5332cf2a69.zip
fix the softlockups in attach_recursive_mnt()
In case when we mounting something on top of a large stack of overmounts, all of them being peers of each other, we get quadratic time by the depth of overmount stack. Easily fixed by doing commit_tree() before reparenting the overmount; simplifies commit_tree() as well - it doesn't need to skip the already mounted stuff that had been reparented on top of the new mounts. Since we are holding mount_lock through both reparenting and call of commit_tree(), the order does not matter from the mount hash point of view. Reported-by: "Lai, Yi" <[email protected]> Tested-by: "Lai, Yi" <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Fixes: 663206854f02 "copy_tree(): don't link the mounts via mnt_list" Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'tools/testing/selftests/filesystems/kernfs_test.c')
0 files changed, 0 insertions, 0 deletions