panic after dhclient in sys/net/if.c mtx_lock
Norikatsu Shigemura
nork at FreeBSD.org
Sun May 17 12:16:42 UTC 2009
Hi.
On Sun, 17 May 2009 20:00:19 +0900
Norikatsu Shigemura <nork at FreeBSD.org> wrote:
> ta_context = 0x0}, if_addr_mtx = {lock_object = {lo_name = 0x0, lo_flags = 0,
> lo_data = 0, lo_witness = 0x0}, mtx_lock = 0}, if_clones = {le_next = 0x0,
In this time, if_addr_mtx doesn't initilized.
According to /usr/src/sys/netinet/in.c:921 (UP#14), ifp = &info,
So I read:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/*
* add a loopback route to self
*/
if (!(ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) {
bzero(&info, sizeof(info));
info.rti_ifp = V_loif;
info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC;
info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr;
info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl;
error = rtrequest1_fib(RTM_ADD, &info, &rt, 0);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
info.rti_ifp == V_loif (=vnet_net_0._loif), but different:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(kgdb) p info.rti_ifp
$16 = (struct ifnet *) 0xffffff00050caa00
(kgdb) p vnet_net_0._loif
$17 = (struct ifnet *) 0xffffff0005172000
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Of cource, V_loif->if_addr_mtx is initialized.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(kgdb) p vnet_net_0._loif->if_addr_mtx
$18 = {lock_object = {lo_name = 0xffffffff80576ca1 "if_addr_mtx", lo_flags = 16973824,
lo_data = 0, lo_witness = 0x0}, mtx_lock = 4}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hum.....
More information about the freebsd-current
mailing list