From owner-cvs-all  Mon Jan 15 17:53:34 2001
Delivered-To: cvs-all@freebsd.org
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP
	id CAF9537B69E; Mon, 15 Jan 2001 17:53:13 -0800 (PST)
Received: (from bmilekic@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f0G1rDh51434;
	Mon, 15 Jan 2001 17:53:13 -0800 (PST)
	(envelope-from bmilekic)
Message-Id: <200101160153.f0G1rDh51434@freefall.freebsd.org>
From: Bosko Milekic <bmilekic@FreeBSD.org>
Date: Mon, 15 Jan 2001 17:53:13 -0800 (PST)
To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject: cvs commit: src/sys/kern uipc_mbuf.c
X-FreeBSD-CVS-Branch: HEAD
Sender: owner-cvs-all@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

bmilekic    2001/01/15 17:53:13 PST

  Modified files:
    sys/kern             uipc_mbuf.c 
  Log:
  Add some KASSERTs valid if WITNESS is defined to verify that the mbuf
  allocation routines are being called safely. Since we drop our relevant
  mbuf mutex and acquire Giant before we call kmem_malloc(), we have
  to make sure that this does not pave the way for a fatal lock order
  reversal. Check that either Giant is already held (in which case it's safe
  to grab it again and recurse on it) or, if Giant is not held, that no
  other locks are held before we try to acquire Giant.
  
  Similarily, add a KASSERT valid in the WITNESS case in m_reclaim() to
  nail callers who end up in m_reclaim() and hold a lock.
  
  Pointed out by: jhb
  
  Revision  Changes    Path
  1.62      +40 -5     src/sys/kern/uipc_mbuf.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message