Re: panic: if_attach called without if_alloc'd input()

From: Brooks Davis (brooks_at_one-eyed-alien.net)
Date: 08/09/05

  • Next message: Mikhail Teterin: "very busy ftpd"
    Date: Tue, 9 Aug 2005 11:16:01 -0700
    To: Darcy Buskermolen <darcy@wavefire.com>
    
    
    

    On Tue, Aug 09, 2005 at 08:54:21AM -0700, Darcy Buskermolen wrote:
    > I'm getting the following panic on my RELENG_6 test box:
    >
    > xl1f0: BUG: if_attach called without if_alloc'd input()
    >
    > Where should I be looking to track this down? I suspect it has to do with a
    > custom kernel, it wasn't doing it when i was running GENERIC

    The ef(4) device is currently broken. I haven't had time to look at it
    much though it seems mostly correct by inspection so I'm not sure what's
    going on.

    If you could compile with debugging and get be a stack trace from the
    panic, that might help be track this down. I'm assuming there's a path
    through the code that I'm missing that results in using a bogus cast to
    get an ifnet pointer and thus causes a panic. You might also try the
    following patch which fixes a couple bugs I think are unrelated, but may
    not be.

    -- Brooks

    Index: if_ef.c
    ===================================================================
    RCS file: /home/ncvs/src/sys/net/if_ef.c,v
    retrieving revision 1.34
    diff -u -p -r1.34 if_ef.c
    --- if_ef.c 10 Jun 2005 16:49:18 -0000 1.34
    +++ if_ef.c 26 Jul 2005 23:56:39 -0000
    @@ -477,7 +477,7 @@ ef_clone(struct ef_link *efl, int ft)
             efp->ef_pifp = ifp;
             efp->ef_frametype = ft;
             eifp = efp->ef_ifp = if_alloc(IFT_ETHER);
    - if (ifp == NULL)
    + if (eifp == NULL)
                     return (ENOSPC);
             snprintf(eifp->if_xname, IFNAMSIZ,
                 "%sf%d", ifp->if_xname, efp->ef_frametype);
    @@ -536,8 +536,8 @@ ef_load(void)
                     SLIST_FOREACH(efl, &efdev, el_next) {
                             for (d = 0; d < EF_NFT; d++)
                                     if (efl->el_units[d]) {
    - if (efl->el_units[d]->ef_pifp != NULL)
    - if_free(efl->el_units[d]->ef_pifp);
    + if (efl->el_units[d]->ef_ifp != NULL)
    + if_free(efl->el_units[d]->ef_ifp);
                                             free(efl->el_units[d], M_IFADDR);
                                     }
                             free(efl, M_IFADDR);

    -- 
    Any statement of the form "X is the one, true Y" is FALSE.
    PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
    
    



  • Next message: Mikhail Teterin: "very busy ftpd"

    Relevant Pages

    • Re: panic: if_attach called without if_allocd input()
      ... I suspect it has to do with a ... >> custom kernel, it wasn't doing it when i was running GENERIC ... > If you could compile with debugging and get be a stack trace from the ... > following patch which fixes a couple bugs I think are unrelated, ...
      (freebsd-net)
    • Asus A7M266-D, Linux 2.6.7 and APIC
      ... I'm having what I suspect is a newbie-type problem, ... when I boot to this custom kernel I get about 2 seconds into the boot ... I've build another custom kernel where the only difference is that SMP is ... send the line "unsubscribe linux-smp" in ...
      (Linux-Kernel)
    • Re: cannot run diffgram in webservice
      ... > error " after I invoked.And I went through step by step debugging, ... I suspect I know what you ... Blog: http://blogs.atozed.com/kudzu ... Prev by Date: ...
      (microsoft.public.dotnet.framework.webservices)
    • Re: Linker Warning in manifest file
      ... for debugging. ... Then I get a blue screen with Fatal windows subsystem error ... I suspect that's the known problem that crashes XP when there's a ...
      (microsoft.public.vc.language)
    • Re: linux-2.6.19-rc2 PCI problem
      ... I suspect you're having problems with the MMConfig method; confirming ... that would be a good step towards debugging the problem. ...
      (Linux-Kernel)