kern/79160: xl_detach cause panic
Yoichi NAKAYAMA
yoichi at FreeBSD.org
Wed Mar 23 05:50:03 PST 2005
>Number: 79160
>Category: kern
>Synopsis: xl_detach cause panic
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 23 13:50:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Yoichi NAKAYAMA
>Release: FreeBSD-current
>Organization:
Geiin.org
>Environment:
>Description:
I'm using cardbus NIC 3CXFE575CT-AP, which uses xl driver.
When I eject the card, I met panic as follows:
panic: _mtx_lock_sleep: recursed on non-recursive mutex xl0 @ /usr/src/sys/pci/if_xl.c:3050
db> trace
kdb_enter(...)
panic(...)
_mtx_lock_sleep(...)
_mtx_lock_flags(...)
xl_ioctl(...)
if_delmulti(...)
in6_delmulti(...)
in6_purgeaddr(...)
if_detach(...)
ether_ifdetach(...)
xl_detach(...)
device_detach(...)
cardbus_detach_card(...)
cbb_removal(...)
cbb_event_thread(...)
>How-To-Repeat:
detach xl device
>Fix:
Remove lock while calling ether_ifdetach(). Almost same problem has been reported before for sys/pci/if_vr.c:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/pci/if_vr.c?rev=1.98&content-type=text/x-cvsweb-markup&only_with_tag=MAIN
There are some other files with similar problem, perhaps.
--- src/sys/pci/if_xl.c.orig
+++ src/sys/pci/if_xl.c
@@ -1705,7 +1705,9 @@
if (device_is_attached(dev)) {
xl_reset(sc);
xl_stop(sc);
+ XL_UNLOCK(sc);
ether_ifdetach(ifp);
+ XL_LOCK(sc);
}
if (sc->xl_miibus)
device_delete_child(dev, sc->xl_miibus);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list