]> 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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:33 +0000 (03:54 +0000)
commit8eb21f2c4ac39e538b2128f5df1e1ebc6f5536ee
tree28e1cd6a0cbd4ac13adf4b8b8f887429db7ef148
parent185e1a93af4b90ec4d84c8fa7a0677c74d615aa0
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/storage/transport.c