Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:41 -0000
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346076 - head/sys/kern
Message-ID:  <201904101021.x3AALErR025374@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904101021.x3AALErR025374>