OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:07 +0000 (14:30 +0200)
commitca157f64dc9c05c2c48dfa7985eb600531ff35f3
treee2bc989849cf2644300a76fa2cfadb05a76995df
parentb572de59915e396b08feda897c7128d4e4d97e83
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>
drivers/usb/storage/ene_ub6250.c