WSL2-Linux-Kernel/drivers/staging/octeon-usb
Aaro Koskinen 120ee599b5 staging: octeon-usb: prevent memory corruption
octeon-hcd will crash the kernel when SLOB is used. This usually happens
after the 18-byte control transfer when a device descriptor is read.
The DMA engine is always transfering full 32-bit words and if the
transfer is shorter, some random garbage appears after the buffer.
The problem is not visible with SLUB since it rounds up the allocations
to word boundary, and the extra bytes will go undetected.

Fix by providing quirk functions for DMA map/unmap that allocate a bigger
temporary buffer when necessary. Tested by booting EdgeRouter Lite
to USB stick root file system with SLAB, SLOB and SLUB kernels.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=72121
Reported-by: Sergey Popov <pinkbyte@gentoo.org>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-20 01:51:12 +00:00
..
Kconfig staging: octeon-usb: depend on CAVIUM_OCTEON_SOC 2013-07-29 11:41:27 -07:00
Makefile staging: octeon-usb: merge cvmx-usb into octeon-hcd 2013-10-06 22:02:21 -07:00
TODO staging: MIPS: add Octeon USB HCD support 2013-06-03 12:45:03 -07:00
octeon-hcd.c staging: octeon-usb: prevent memory corruption 2014-03-20 01:51:12 +00:00
octeon-hcd.h staging: octeon-usb: use a single .h file 2013-10-11 15:45:59 -07:00