aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/storage/transport.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers: usb: storage: transport: fix maybe-uninitialized warningsNathan Chancellor2017-04-131-2/+2
| | | | | | | | | | | | | | | | | | drivers/usb/storage/transport.c: In function 'usb_stor_bulk_srb': drivers/usb/storage/transport.c:473:40: warning: 'partial' may be used uninitialized in this function [-Wmaybe-uninitialized] scsi_set_resid(srb, scsi_bufflen(srb) - partial); ~~~~~~~~~~~~~~~~~~^~~~~~~~~ drivers/usb/storage/transport.c: In function 'usb_stor_bulk_transfer_sg': drivers/usb/storage/transport.c:499:15: warning: 'partial' may be used uninitialized in this function [-Wmaybe-uninitialized] length_left -= partial; ~~~~~~~~~~~~^~~~~~~~~~ drivers/usb/storage/transport.c: In function 'usb_stor_bulk_transfer_sg': drivers/usb/storage/transport.c:499:15: warning: 'partial' may be used uninitialized in this function [-Wmaybe-uninitialized] length_left -= partial; ~~~~~~~~~~~~^~~~~~~~~~ Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=yPetr Vandrovec2017-04-111-1/+6
| | | | | | | | | | | | | | | | 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: Willy Tarreau <w@1wt.eu>
* first commitMeizu OpenSource2016-08-151-0/+1377