em0 panic: mutex em0 not owned
John Baldwin
jhb at freebsd.org
Tue Nov 27 13:59:44 PST 2007
On Tuesday 27 November 2007 12:25:52 pm Jack Vogel wrote:
> On Nov 27, 2007 8:10 AM, Mark Atkinson <atkin901 at yahoo.com> wrote:
>
> >
> > Is this expected after the fix?
> >
> > acquiring duplicate lock of same type: "network driver"
> > 1st em0 @ /usr/src/sys/dev/em/if_em.c:1018
> > 2nd em0 @ /usr/src/sys/dev/em/if_em.c:1252
>
> Same type, different lock, I don't see a problem unless
> there's some subtle thing I'm not aware of?
Give them unique names then so witness can track them separately. :) The
MTX_NETWORK_LOCK is really there so witness can track all driver locks at the
same point in the hierarchy it uses to track lock orders. If you have a
primary lock for the driver you can leave it as MTX_NETWORK_LOCK but use
different types for other locks in the driver. For example:
mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK,
MTX_DEF);
mtx_init(&sc->tx_ring_lock, device_get_nameunit(dev), "tx ring lock",
MTX_DEF);
--
John Baldwin
More information about the freebsd-current
mailing list