Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: new if_bge/mii panic
Hi Matthias
On 11/06/2013 18:57, Matthias Drochner wrote:
Hi -
after I updated my kernel to today's sources (the last one was about
6
weeks old), I'm getting this panic:
#3 0xc04c95f1 in panic (fmt=0xc06e42dd "%s: %s caller=%p")
at ../../../../kern/subr_prf.c:200
#4 0xc033846c in assert_sleepable
() at ../../../../kern/kern_lock.c:92
#5 0xc04c7c1b in
pool_cache_get_paddr (pc=0xc1a5ae00, flags=1, pap=0x0)
at ../../../../kern/subr_pool.c:2212
#6 0xc04bed1c in kmem_intr_alloc
(requested_size=20, kmflags=1) at ../../../../kern/subr_kmem.c:265
#7 0xc033bb21 in kern_malloc (size=16, flags=2)
at ../../../../kern/kern_malloc.c:118
#8 0xc0388b6c in
in6_createmkludge (ifp=0xc1aeb004) at ../../../../netinet6/mld6.c:872
#9 0xc02bf19c in in6_ifattach (ifp=0xc1aeb004, altifp=0x0)
at ../../../../netinet6/in6_ifattach.c:778
#10 0xc02bd5b5 in in6_if_up
(ifp=0xc1aeb004) at ../../../../netinet6/in6.c:2212
#11 0xc0387122 in
mii_phy_statusmsg (sc=<optimized out>)
at ../../../../dev/mii/mii_physubr.c:444
#12 mii_phy_update
(sc=0xc1de15d0, cmd=3) at ../../../../dev/mii/mii_physubr.c:427
#13 0xc016b83a in brgphy_service (sc=0xc1de15d0, mii=0xc1aeb2b4,
cmd=3)
at ../../../../dev/mii/brgphy.c:452
#14 0xc038633b in phy_service
(cmd=3, mii=0xc1aeb2b4, sc=0xc1de15d0) at
../../../../dev/mii/mii.c:198
#15 mii_pollstat (mii=0xc1aeb2b4) at ../../../../dev/mii/mii.c:251
#16 0xc0274be6 in bge_link_upd (sc=0xc1aeb000)
at ../../../../dev/pci/if_bge.c:5782
#17 bge_intr (xsc=0xc1aeb000)
at ../../../../dev/pci/if_bge.c:4534
#18 0xc02cdd70 in
intr_biglock_wrapper (vp=0xc1d8b548)
at ../../../../arch/x86/x86/intr.c:605
#19 0xc0107825 in Xintr_ioapic_level3 ()
There were significant changes in both if_bge and mii, so I'm
refraining
from guesses for now.
Could have been caused by me here:
http://mail-index.netbsd.org/source-changes/2013/06/11/msg044684.html
The attached patch shouldn't help you as you're already at splnet()
from mii_physubr.c but it's probably better.
Roy
Index: dev/mii/mii_physubr.c
===================================================================
RCS file: /cvsroot/src/sys/dev/mii/mii_physubr.c,v
retrieving revision 1.78
diff -u -p -r1.78 mii_physubr.c
--- dev/mii/mii_physubr.c 9 Jun 2013 09:56:17 -0000 1.78
+++ dev/mii/mii_physubr.c 12 Jun 2013 07:57:48 -0000
@@ -436,9 +436,7 @@ mii_phy_statusmsg(struct mii_softc *sc)
{
struct mii_data *mii = sc->mii_pdata;
struct ifnet *ifp = mii->mii_ifp;
- int s;
- s = splnet();
if (mii->mii_media_status & IFM_AVALID) {
if (mii->mii_media_status & IFM_ACTIVE)
if_link_state_change(ifp, LINK_STATE_UP);
@@ -446,7 +444,6 @@ mii_phy_statusmsg(struct mii_softc *sc)
if_link_state_change(ifp, LINK_STATE_DOWN);
} else
if_link_state_change(ifp, LINK_STATE_UNKNOWN);
- splx(s);
ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active);
}
Index: net/if.c
===================================================================
RCS file: /cvsroot/src/sys/net/if.c,v
retrieving revision 1.263
diff -u -p -r1.263 if.c
--- net/if.c 11 Jun 2013 12:08:29 -0000 1.263
+++ net/if.c 12 Jun 2013 07:57:48 -0000
@@ -1337,10 +1337,13 @@ link_rtrequest(int cmd, struct rtentry *
void
if_link_state_change(struct ifnet *ifp, int link_state)
{
- int old_link_state;
+ int old_link_state, s;
- if (ifp->if_link_state == link_state)
+ s = splnet();
+ if (ifp->if_link_state == link_state) {
+ splx(s);
return;
+ }
old_link_state = ifp->if_link_state;
ifp->if_link_state = link_state;
@@ -1383,6 +1386,8 @@ if_link_state_change(struct ifnet *ifp,
else if (link_state == LINK_STATE_UP)
in6_if_up(ifp);
#endif
+
+ splx(s);
}
/*
Home |
Main Index |
Thread Index |
Old Index