svn commit: r352437 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Tue Sep 17 08:09:40 UTC 2019
Author: mjg
Date: Tue Sep 17 08:09:39 2019
New Revision: 352437
URL: https://svnweb.freebsd.org/changeset/base/352437
Log:
vfs: fix braino resulting in NULL pointer deref in r352424
The breakage was added after all the testing and the testing which followed
was not sufficient to find it.
Reported by: pho
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/kern/vfs_default.c
Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c Tue Sep 17 06:08:15 2019 (r352436)
+++ head/sys/kern/vfs_default.c Tue Sep 17 08:09:39 2019 (r352437)
@@ -613,11 +613,13 @@ vop_stdgetwritemount(ap)
vfs_op_thread_exit(mp);
} else {
MNT_ILOCK(mp);
- if (mp == vp->v_mount)
+ if (mp == vp->v_mount) {
MNT_REF(mp);
- else
+ MNT_IUNLOCK(mp);
+ } else {
+ MNT_IUNLOCK(mp);
mp = NULL;
- MNT_IUNLOCK(mp);
+ }
}
*(ap->a_mpp) = mp;
return (0);
More information about the svn-src-all
mailing list