aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/storage
Commit message (Collapse)AuthorAgeFilesLines
* usb: replace %p with %pKManu Gautam2018-11-271-1/+1
| | | | | | | | | | | | | | | Format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. When kptr_restrict is set to (1), kernel pointers printed using the %pK format specifier will be replaced with 0's. Debugging Note : &pK prints only Zeros as address. If you need actual address information, write 0 to kptr_restrict. echo 0 > /proc/sys/kernel/kptr_restrict CRs-fixed: 1052849 Change-Id: I0e98145730380ea983fa8f46a28d15dd6c2c31df Signed-off-by: Manu Gautam <mgautam@codeaurora.org> Signed-off-by: Yasir Malik <ymalik@codeaurora.org> Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
* 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>
* usb-storage: ignore ZTE MF 823 card reader in mode 0x1225Oliver Neukum2016-08-261-0/+12
| | | | | | | | | | | | | | | | | | | commit 5fb2c782f451a4fb9c19c076e2c442839faf0f76 upstream. This device automatically switches itself to another mode (0x1405) unless the specific access pattern of Windows is followed in its initial mode. That makes a dirty unmount of the internal storage devices inevitable if they are mounted. So the card reader of such a device should be ignored, lest an unclean removal become inevitable. This replaces an earlier patch that ignored all LUNs of this device. That patch was overly broad. Signed-off-by: Oliver Neukum <oneukum@suse.com> Reviewed-by: Lars Melin <larsm17@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
* 3.10.79 -> 3.10.80Jan Engelmohr2016-08-261-0/+7
|
* first commitMeizu OpenSource2016-08-1547-0/+22639