lkml.org 
[lkml]   [2004]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/9] USB usbfs: take a reference to the usb device
    On Mon, Apr 26, 2004 at 04:05:17PM +0200, Duncan Sands wrote:
    > diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
    > --- a/drivers/usb/core/devio.c Mon Apr 26 13:48:28 2004
    > +++ b/drivers/usb/core/devio.c Mon Apr 26 13:48:28 2004
    > @@ -350,8 +350,8 @@
    > * all pending I/O requests; 2.6 does that.
    > */
    >
    > - if (ifnum < 8*sizeof(ps->ifclaimed))
    > - clear_bit(ifnum, &ps->ifclaimed);
    > + BUG_ON(ifnum >= 8*sizeof(ps->ifclaimed));

    I've changed that to a WARN_ON(). Yeah, writing over memory is bad, but
    oopsing is worse. Let's be a bit nicer than that.

    thanks,

    greg k-h
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:02    [W:0.020 / U:85.300 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site