Files
linux-stable-mirror/fs
Al ViroandGreg Kroah-Hartman d8ece4ced3 __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-06-04 14:42:17 +02:00
..
2024-08-19 06:04:25 +02:00
2025-01-17 13:36:11 +01:00
2024-10-22 15:46:20 +02:00
2024-12-14 20:00:21 +01:00
2025-04-25 10:45:48 +02:00
2024-08-19 06:04:25 +02:00
2025-03-22 12:50:41 -07:00
2024-08-19 06:04:25 +02:00