Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Jan 2003 10:59:33 -0700 (MST)
From:      "M. Warner Losh" <>
Cc:,, current@FreeBSD.ORG, net@FreeBSD.ORG
Subject:   Re: Proper -current if_attach locking?
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
In message: <>
            Andrew Gallatin <> writes:
: The IFNET_RLOCK() called in if_slowtimo() is a global lock for the
: list of ifnet structs to ensure that no devices are removed or added
: while something may be using it.  There is one ifnet list in the system.

So this means that only the locking in attach is bogus, and similar
locking in detach is also bogus because they produce lock order
reversals as the global lock is held to insert/remove if interfaces.

: The lock in IF_PREPEND() (and more commonly used in drivers,
: IF_DEQUE()) is per-ifq, to protect against multiple accesses 
: to a single  ifq.  There are many ifqs in the system.

I knew I must have been missing something really fundamental last


To Unsubscribe: send mail to
with "unsubscribe freebsd-current" in the body of the message

Want to link to this message? Use this URL: <>