]> Pileus Git - ~andy/linux/commit
[IRDA]: irda-usb bug fixes
authorJean Tourrilhes <jt@hpl.hp.com>
Mon, 20 Feb 2006 06:28:25 +0000 (22:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2006 06:28:25 +0000 (22:28 -0800)
commit669d32a293a348e692c365ddac2b23f3b907fcf1
tree3ff874623fd3200bf4dc2ca23b39e589a1b6fbf1
parentbc6e14b6f0b06fe93d809d22e257ddd275feeda9
[IRDA]: irda-usb bug fixes

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: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/irda-usb.c
drivers/net/irda/irda-usb.h