Re: [PATCH net v2] net: usbnet: prevent buggy devices from killing us

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 29 January 2013 10:51:28 Bjørn Mork wrote:
> A device sending 0 length frames as fast as it can has been
> observed killing the host system due to the resulting memory
> pressure.
> 
> Temporarily disable RX skb allocation and URB submission when
> the current error ratio is high, preventing us from trying to
> allocate an infinite number of skbs.  Reenable as soon as we
> are finished processing the done queue, allowing the device
> to continue working after short error bursts.
> 
> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
Acked-by: Oliver Neukum <oneukum@xxxxxxx>

> ---
> v2 changes:
>  - reset counters in open to avoid starting in previous error state
>  - remove superfluous debug logging.  Errors are logged per packet
>    when debugging is on anyway.
> 
> The removal of the debug logging should address your concerns, Joe?
> 
> Note that I have not added any new device reset or the like, Oliver.  It
> does not seem to help for the device I am testing.  And being a composite

Well, this is a very buggy firmware.

> device, where this bug only affects *one* function, I do not think it
> would be appropriate even if it did help.  Note that the device may be

Reset is used by storage and HID whether the device is composite
or not.
But if reset doesn't actually work, the point is moot.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux