svn commit: r347577 - stable/12/sys/kern

Edward Tomasz Napierala trasz at FreeBSD.org
Tue May 14 20:31:07 UTC 2019


Author: trasz
Date: Tue May 14 20:31:06 2019
New Revision: 347577
URL: https://svnweb.freebsd.org/changeset/base/347577

Log:
  MFC r346076:
  
  Improve vnode lock assertions.
  
  Sponsored by:	DARPA, AFRL

Modified:
  stable/12/sys/kern/imgact_elf.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/imgact_elf.c
==============================================================================
--- stable/12/sys/kern/imgact_elf.c	Tue May 14 20:29:12 2019	(r347576)
+++ stable/12/sys/kern/imgact_elf.c	Tue May 14 20:31:06 2019	(r347577)
@@ -659,6 +659,8 @@ __elfN(load_sections)(struct image_params *imgp, const
 	bool first;
 	int error, i;
 
+	ASSERT_VOP_LOCKED(imgp->vp, __func__);
+
 	base_addr = 0;
 	first = true;
 
@@ -925,8 +927,7 @@ __elfN(get_interp)(struct image_params *imgp, const El
 
 	KASSERT(phdr->p_type == PT_INTERP,
 	    ("%s: p_type %u != PT_INTERP", __func__, phdr->p_type));
-	KASSERT(VOP_ISLOCKED(imgp->vp),
-	    ("%s: vp %p is not locked", __func__, imgp->vp));
+	ASSERT_VOP_LOCKED(imgp->vp, __func__);
 
 	td = curthread;
 


More information about the svn-src-stable mailing list