Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2019 20:31:06 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r347577 - stable/12/sys/kern
Message-ID:  <201905142031.x4EKV6eO073412@repo.freebsd.org>

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



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