]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y
authorPetr Vandrovec <petr@vandrovec.name>
Thu, 10 Nov 2016 21:57:14 +0000 (13:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2016 08:10:31 +0000 (09:10 +0100)
commitb33387f6a68dd45f68770c1e89e0eb937ce426e6
treee3a5bfa435a2d7c3978e67734668846e51464d13
parent89a28f3a3c77c5a71eba35907b606703145855db
Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y

commit 2ce9d2272b98743b911196c49e7af5841381c206 upstream.

Some code (all error handling) submits CDBs that are allocated
on the stack.  This breaks with CB/CBI code that tries to create
URB directly from SCSI command buffer - which happens to be in
vmalloced memory with vmalloced kernel stacks.

Let's make copy of the command in usb_stor_CB_transport.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/transport.c