Commit 4727bd4
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
commit 250cf36 upstream.
... 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: Maximilian Heyne <mheyne@amazon.de>1 parent 0965d85 commit 4727bd4
1 file changed
+1
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | 665 | | |
670 | | - | |
| 666 | + | |
671 | 667 | | |
672 | 668 | | |
673 | 669 | | |
| |||
0 commit comments