Re: 6BETA5 panic with ifconfig nge

From: Yuriy N. Shkandybin (jura_at_networks.ru)
Date: 09/26/05

  • Next message: Brooks Davis: "Re: Question about atheros wireless card"
    To: <freebsd-stable@freebsd.org>
    Date: Mon, 26 Sep 2005 17:37:43 +0400
    
    

    Patch below fixes my panics:
    Main is:
                sc->nge_ldata = contigmalloc(sizeof(struct nge_list_data), M_DEVBUF,
    - M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
    + M_NOWAIT|M_ZERO, 0, 0xffffffff, PAGE_SIZE, 0);

    Other is incorporated rev. 1.78-1.79 of if_nge.c from HEAD.

    Jura

    --- if_nge.c.orig Mon Sep 26 17:02:00 2005
    +++ if_nge.c.my Mon Sep 26 16:59:26 2005
    @@ -839,7 +839,7 @@

            /* XXX: leaked on error */
            sc->nge_ldata = contigmalloc(sizeof(struct nge_list_data), M_DEVBUF,
    - M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
    + M_NOWAIT|M_ZERO, 0, 0xffffffff, PAGE_SIZE, 0);

            if (sc->nge_ldata == NULL) {
                    printf("nge%d: no memory for list buffers!\n", unit);
    @@ -912,6 +912,7 @@

                    } else {
                            printf("nge%d: MII without any PHY!\n", sc->nge_unit);
    + if_free(ifp);
                            bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq);
                            bus_release_resource(dev, NGE_RES, NGE_RID,
                                             sc->nge_res);
    @@ -933,6 +934,7 @@
                nge_intr, sc, &sc->nge_intrhand);
            if (error) {
                    /* XXX: resource leaks */
    + if_free(ifp);
                    bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq);
                    bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res);
                    printf("nge%d: couldn't set up irq\n", unit);
    @@ -960,7 +962,6 @@
            nge_stop(sc);
            NGE_UNLOCK(sc);
            ether_ifdetach(ifp);
    - if_free(ifp);

            bus_generic_detach(dev);
            if (!sc->nge_tbi) {
    @@ -971,6 +972,7 @@
            bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res);

            contigfree(sc->nge_ldata, sizeof(struct nge_list_data), M_DEVBUF);
    + if_free(ifp);

            NGE_LOCK_DESTROY(sc);
    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"


  • Next message: Brooks Davis: "Re: Question about atheros wireless card"

    Relevant Pages

    • Re: latest current panics with ata
      ... > I updated my current yesterday (to HEAD as usual) and it ... > now panics when having my ultrabay dvdrom inserted: ... Soren fixed this problem yesterday. ... To unsubscribe, ...
      (freebsd-current)
    • Re: panic: kern/52718
      ... Privileged/Confidential Information may be contained in this message. ... employer do not consent to Internet email for messages of this kind. ... available - it panics during boot. ... To unsubscribe, ...
      (freebsd-current)
    • Re: OK, so Im board...
      ... wlel. ... be used to add validity to the ToE. ... Once again a point that was made and soared so high over your head that the ... Perhaps you should do yourself a favor and "unsubscribe" ...
      (talk.origins)
    • Re: Fw: The Order of Maltas new head
      ... The Order of Malta's new head ... and I've found a few new pathways that Leo isn't ... To unsubscribe from the list, ... No virus found in this incoming message. ...
      (soc.genealogy.medieval)
    • RE: raw socket programming
      ... Off the top of my head this appears to be an include sequencing/circular ... >I am playing with raw sockets on a FreeBSD 4.8 STABLE. ... To unsubscribe, ...
      (freebsd-hackers)