Date: Sun, 17 May 2009 21:16:35 +0900 From: Norikatsu Shigemura <nork@FreeBSD.org> To: freebsd-current@FreeBSD.org Cc: Norikatsu Shigemura <nork@FreeBSD.org> Subject: Re: panic after dhclient in sys/net/if.c mtx_lock Message-ID: <20090517211635.216b23ae.nork@FreeBSD.org> In-Reply-To: <20090517200019.275f6c71.nork@FreeBSD.org> References: <20090517200019.275f6c71.nork@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi.
On Sun, 17 May 2009 20:00:19 +0900
Norikatsu Shigemura <nork@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.....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090517211635.216b23ae.nork>
