Re: [PATCH] fwip(4) panic on attach

From: Sam Leffler (sam_at_errno.com)
Date: 07/31/05

  • Next message: Christian Brueffer: "Re: [PATCH] fwip(4) panic on attach"
    Date: Sun, 31 Jul 2005 10:14:00 -0700
    To: Christian Brueffer <chris@unixpages.org>
    
    

    Christian Brueffer wrote:
    > Hi,
    >
    > in CURRENT and RELENG_6 I get a reproducible panic with fwip(4) when
    > plugging in my firewire cardbus card. The following patch fixes it,
    > but I'm not sure if it's correct.
    >
    > The interface works after applying the patch.
    >
    > Index: if_fwip.c
    > ===================================================================
    > RCS file: /data/ncvs/freebsd/src/sys/dev/firewire/if_fwip.c,v
    > retrieving revision 1.7
    > diff -u -r1.7 if_fwip.c
    > --- if_fwip.c 10 Jun 2005 16:49:08 -0000 1.7
    > +++ if_fwip.c 31 Jul 2005 14:01:52 -0000
    > @@ -171,11 +171,13 @@
    >
    > fwip = ((struct fwip_softc *)device_get_softc(dev));
    > unit = device_get_unit(dev);
    > +
    > + bzero(fwip, sizeof(struct fwip_softc));
    > +
    > ifp = fwip->fw_softc.fwip_ifp = if_alloc(IFT_IEEE1394);
    > if (ifp == NULL)
    > return (ENOSPC);
    >
    > - bzero(fwip, sizeof(struct fwip_softc));
    > /* XXX */
    > fwip->dma_ch = -1;
    >

    I thought the softc was guaranteed to be zero'd; can't you just delete
    the bzero?

            Sam

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Christian Brueffer: "Re: [PATCH] fwip(4) panic on attach"

    Relevant Pages

    • [PATCH] fwip(4) panic on attach
      ... plugging in my firewire cardbus card. ... The following patch fixes it, ... diff -u -r1.7 if_fwip.c ...
      (freebsd-current)
    • Re: [PATCH] fwip(4) panic on attach
      ... > Christian Brueffer wrote: ... The following patch fixes it, ... >>The interface works after applying the patch. ... There's a similar bzero() call in if_fwe.c that should be removed then. ...
      (freebsd-current)