Commit 614debf
do_umount(): add missing barrier before refcount checks in sync case
[ Upstream commit 65781e1 ]
do_umount() analogue of the race fixed in 119e1ef "fix
__legitimize_mnt()/mntput() race". Here we want to make sure that
if __legitimize_mnt() doesn't notice our lock_mount_hash(), we will
notice their refcount increment. Harder to hit than mntput_no_expire()
one, fortunately, and consequences are milder (sync umount acting
like umount -l on a rare race with RCU pathwalk hitting at just the
wrong time instead of use-after-free galore mntput_no_expire()
counterpart used to be hit). Still a bug...
Fixes: 48a066e ("RCU'd vfsmounts")
Reviewed-by: Christian Brauner <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 1b2e829 commit 614debf
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
| 781 | + | |
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| |||
1956 | 1956 | | |
1957 | 1957 | | |
1958 | 1958 | | |
| 1959 | + | |
1959 | 1960 | | |
1960 | 1961 | | |
1961 | 1962 | | |
| |||
0 commit comments