svn commit: r346076 - head/sys/kern

Edward Tomasz Napierala trasz at FreeBSD.org
Wed Apr 10 10:21:15 UTC 2019


Author: trasz
Date: Wed Apr 10 10:21:14 2019
New Revision: 346076
URL: https://svnweb.freebsd.org/changeset/base/346076

Log:
  Improve vnode lock assertions.
  
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Wed Apr 10 09:19:26 2019	(r346075)
+++ head/sys/kern/imgact_elf.c	Wed Apr 10 10:21:14 2019	(r346076)
@@ -658,6 +658,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;
 
@@ -924,8 +926,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-head mailing list