diff options
author | 2025-08-15 15:38:14 -0400 | |
---|---|---|
committer | 2025-08-19 11:58:18 -0400 | |
commit | 0ddfb62f5d018edcb571a3d8ea30ad5332cf2a69 (patch) | |
tree | 0ebcb9ab807cebd06512f8ec89956c56c94882c1 /tools/perf/scripts/python | |
parent | Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff) | |
download | wireguard-linux-0ddfb62f5d018edcb571a3d8ea30ad5332cf2a69.tar.xz wireguard-linux-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" <yi1.lai@linux.intel.com>
Tested-by: "Lai, Yi" <yi1.lai@linux.intel.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Fixes: 663206854f02 "copy_tree(): don't link the mounts via mnt_list"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions