diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-06-22 18:03:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-06 11:01:39 +0200 |
commit | b10a7953649b12d7f9f8fbfcc62f9223ba7f4697 (patch) | |
tree | 5f065391dacd4a0acc7496a5bc98b1d81c7c9fcd /net/unix/af_unix.c | |
parent | 0ee87c2814deb5e42921281116ac3abcb326880b (diff) |
attach_recursive_mnt(): do not lock the covering tree when sliding something under it
[ Upstream commit ce7df19686530920f2f6b636e71ce5eb1d9303ef ]
If we are propagating across the userns boundary, we need to lock the
mounts added there. However, in case when something has already
been mounted there and we end up sliding a new tree under that,
the stuff that had been there before should not get locked.
IOW, lock_mnt_tree() should be called before we reparent the
preexisting tree on top of what we are adding.
Fixes: 3bd045cc9c4b ("separate copying and locking mount tree on cross-userns copies")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions