• J
    [IRDA]: irda-usb bug fixes · 669d32a2
    Jean Tourrilhes 提交于
    This patch fixes 2 bugs in the USB-IrDA code.
    
    The first one is a buffer overrun in the RX path. We are now using
    IRDA_SKB_MAX_MTU when initializing the Rx URB.
    
    The second one is a potential stack recursion when unplugging the USB
    dongle.  It seems that first we get the Rx URB with a generic error
    code, and after a while the Rx URB comes again with a "disconnect"
    error code.  Since we are resubmitting the Rx URB immediately after
    receiving the first error one, we might enter an endless loop.
    
    When getting an error Rx URB, the patch defers the Rx URB resubmitting
    so that it gives us a chance to catch the disconnect one, in case the
    dongle has juts been unplugged.
    
    Tested against 2.6.16-rc2.
    
    Patch from Jean Tourrilhes
    Signed-off-by: NJean Tourrilhes <jt@hpl.hp.com>
    Signed-off-by: NSamuel Ortiz <samuel.ortiz@nokia.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    669d32a2
irda-usb.c 50.8 KB