Files
linux-stable-mirror/fs
Al Viro 8cafd7266f __legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
[ Upstream commit 250cf36930 ]

... or we risk stealing final mntput from sync umount - raising mnt_count
after umount(2) has verified that victim is not busy, but before it
has set MNT_SYNC_UMOUNT; in that case __legitimize_mnt() doesn't see
that it's safe to quietly undo mnt_count increment and leaves dropping
the reference to caller, where it'll be a full-blown mntput().

Check under mount_lock is needed; leaving the current one done before
taking that makes no sense - it's nowhere near common enough to bother
with.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-29 11:03:13 +02:00
..
2024-10-17 00:28:06 -07:00
2024-12-14 20:04:14 +01:00
2025-04-25 10:47:53 +02:00
2025-01-23 17:22:55 +01:00
2025-03-22 12:54:15 -07:00
2025-05-02 07:59:29 +02:00
2024-12-05 14:02:47 +01:00
2025-01-17 13:40:50 +01:00
2024-09-27 08:18:43 -07:00
2024-09-27 08:18:43 -07:00