Date: Mon, 11 Aug 2003 15:50:26 -0700 (PDT) From: Ted Unangst <tedu@stanford.edu> To: John Baldwin <jhb@FreeBSD.org> Cc: freebsd-hackers@FreeBSD.org Subject: Re: possible deadlocks? Message-ID: <Pine.GSO.4.44.0308111544090.21112-100000@saga8.Stanford.EDU> In-Reply-To: <XFMail.20030811180315.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 Aug 2003, John Baldwin wrote: > You can't ifconfig sk0 until after it attaches. sk0 and sk1 don't > share locks, so you don't have to worry about the interaction there. I believe they do share a lock. Each port of a dual port sk appears as an individual interface, but they share the same sk_softc. Is that incorrect? So sk0 will be attached, but for a short while, sk1 will not be attached, even though they share the softc, which is really for the skc. > Also, SK_LOCK != SK_IF_LOCK, or is that a typo? If it is a typo, > then the lock order should still be fixed in some fashion. They are the same. SK_IF_LOCK is called on the sk_if_softc, but just locks the shared sk_softc mutex. Does that make sense? #define SK_LOCK(_sc) mtx_lock(&(_sc)->sk_mtx) #define SK_IF_LOCK(_sc) mtx_lock(&(_sc)->sk_softc->sk_mtx) -- "I am a great mayor; I am an upstanding Christian man; I am an intelligent man; I am a deeply educated man; I am a humble man." - M. Barry, Mayor of Washington, DC
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.44.0308111544090.21112-100000>