From 120ee599b5bf4273992ef9c6ac2a316cc3630969 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Thu, 20 Mar 2014 00:52:08 +0200 Subject: [PATCH] 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 Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed