Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Oct 2009 23:42:40 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Harsha <inpcb.harsha@gmail.com>
Cc:        freebsd-current@freebsd.org, "Robert N. M. Watson" <rwatson@freebsd.org>, net@freebsd.org
Subject:   Re: Page fault in IFNET_WLOCK_ASSERT [if.c and pccbb.c]
Message-ID:  <4ADAB8E0.3090502@elischer.org>
In-Reply-To: <e1b1c5880910172328s6bc0c53ctc782b9993ffbdb00@mail.gmail.com>
References:  <e1b1c5880910111226o65e0d1a9va975f4cd837271bb@mail.gmail.com>	<alpine.BSF.2.00.0910112126050.48605@fledge.watson.org>	<e1b1c5880910112138x1b46ff0eo39c10691a978c164@mail.gmail.com>	<FE5F0845-B909-4B9B-A999-DAA7D8F4E56D@freebsd.org> <e1b1c5880910172328s6bc0c53ctc782b9993ffbdb00@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Harsha wrote:
> Hi Robert,
> 
> Apologies for not getting earlier.
> 
> On Mon, Oct 12, 2009 at 6:46 AM, Robert N. M. Watson
> <rwatson@freebsd.org> wrote:
>> Looks like a NULL pointer dereference, so perhaps a more traditional bug --
>> could you convert ifindex_alloc_locked+0x71 to a line of code? You can do
>> this using kgdb on the kernel symbols file, perhaps "l
>> *ifindex_alloc_locked+0x71".
> It is the for loop in ifindex_alloc_locked() function-
>  for (idx = 1; idx <= V_if_index; idx++)
> 
> idx is a local variable, so I figured it is V_if_index is what is
> causing the page fault. It does look like a NULL pointer reference - I
> see that V_if_index comes from that  vnet instance's value and uses
> the macro VNET_VNET_PTR() down the chain. Since the call chain is
> coming from a new thread cbb_event_thread, I believe that this
> thread's vnet context needs to be set using CURVNET_SET().

but only if you have options VIMAGE defined. if not then CURVNET_SET()
is a NOP


> 
> I'll try this tomorrow, but if think I'm not on the right track or
> want me to try something else please let me know.
> 
> Many thanks,
> Harsha
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ADAB8E0.3090502>