USB: ene_usb6250: fix DMA to the stack
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 16 May 2017 15:47:29 +0000 (11:47 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Sep 2017 17:30:42 +0000 (18:30 +0100)
commitab8f1df1e68713eb52ad216117b41de3207fa844
treed5dd6c762a8bc9a8f417140e717b6fe1d8e91909
parent5a0fe5df7de562f40d800c6797a8370cf139ec2c
USB: ene_usb6250: fix DMA to the stack

commit 628c2893d44876ddd11602400c70606ade62e129 upstream.

The ene_usb6250 sub-driver in usb-storage does USB I/O to buffers on
the stack, which doesn't work with vmapped stacks.  This patch fixes
the problem by allocating a separate 512-byte buffer at probe time and
using it for all of the offending I/O operations.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/storage/ene_ub6250.c