svn commit: r351702 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Mon Sep 2 15:24:26 UTC 2019


Author: mjg
Date: Mon Sep  2 15:24:25 2019
New Revision: 351702
URL: https://svnweb.freebsd.org/changeset/base/351702

Log:
  vfs: restore mp null check in vop_stdgetwritemount
  
  The initially read mount point can already be NULL.
  
  Reported by:	markj
  Fixes: r351656 ("vfs: stop refing freed mount points in vop_stdgetwritemount")
  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	Mon Sep  2 14:51:59 2019	(r351701)
+++ head/sys/kern/vfs_default.c	Mon Sep  2 15:24:25 2019	(r351702)
@@ -601,6 +601,8 @@ vop_stdgetwritemount(ap)
 	 */
 	vp = ap->a_vp;
 	mp = vp->v_mount;
+	if (mp == NULL)
+		goto out;
 	MNT_ILOCK(mp);
 	if (mp != vp->v_mount) {
 		MNT_IUNLOCK(mp);


More information about the svn-src-head mailing list