possible deadlocks?

Ted Unangst tedu at stanford.edu
Mon Aug 11 14:40:08 PDT 2003


one more.  This falls into the very improbable category.  Ordinarily, I
don't think this is possible because FreeBSD doesn't support hotplug PCI,
so sk attachment can't be raced.

However, assuming I had some hot plug sk card, it seems like running
ifconfig sk0 at just the wrong point during sk1 attach will deadlock.  If
it absolutely can not happen (for a reason other than sk is attached
before init runs) please explain.

sk.c:
  sk_attach_xmac()
    SK_LOCK(sc); /* grabs */
    ether_ifattach()
      ifattach()
        IFNET_WLOCK() /* waits for 2 */

in6_ifattach.c:
  in6_nigroup_attach()
    IFNET_RLOCK() /* grabs */
    in6_addmulti()
      if_addmulti()
        sk_ioctl()
	  SK_IF_LOCK();  /* waits for 1 */



-- 
"First, it was not a strip bar, it was an erotic club.  And second,
what can I say?  I'm a night owl."
      - M. Barry, Mayor of Washington, DC



More information about the freebsd-hackers mailing list