On Thu, 2013-01-24 at 16:39 +0400, Sergei Shtylyov wrote:
On 24-01-2013 14:25, Bjørn Mork wrote:
quoted
A device sending 0 length frames as fast as it can has been
observed killing the host system due to the resulting memory
pressure.
[]
quoted
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
[]
quoted
+ /* Do not let a device flood us to death! */
+ if (dev->done.qlen > 1024) {
+ netif_dbg(dev, rx_err, dev->net, "done queue filling up (%u) - throttling\n", dev->done.qlen);
+ usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
+ usb_free_urb (urb);
Run your patch thru scripts/checkpatch.pl please
And maybe ratelimit the netif_dbg
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html