remarkable-linux/include/scsi
Mark Rustad 222a806af8 [SCSI] Fix NULL dereferences in scsi_cmd_to_driver
Avoid crashing if the private_data pointer happens to be NULL. This has
been seen sometimes when a host reset happens, notably when there are
many LUNs:

host3: Assigned Port ID 0c1601
scsi host3: libfc: Host reset succeeded on port (0c1601)
BUG: unable to handle kernel NULL pointer dereference at 0000000000000350
IP: [<ffffffff81352bb8>] scsi_send_eh_cmnd+0x58/0x3a0
<snip>
Process scsi_eh_3 (pid: 4144, threadinfo ffff88030920c000, task ffff880326b160c0)
Stack:
 000000010372e6ba 0000000000000282 000027100920dca0 ffffffffa0038ee0
 0000000000000000 0000000000030003 ffff88030920dc80 ffff88030920dc80
 00000002000e0000 0000000a00004000 ffff8803242f7760 ffff88031326ed80
Call Trace:
 [<ffffffff8105b590>] ? lock_timer_base+0x70/0x70
 [<ffffffff81352fbe>] scsi_eh_tur+0x3e/0xc0
 [<ffffffff81353a36>] scsi_eh_test_devices+0x76/0x170
 [<ffffffff81354125>] scsi_eh_host_reset+0x85/0x160
 [<ffffffff81354291>] scsi_eh_ready_devs+0x91/0x110
 [<ffffffff813543fd>] scsi_unjam_host+0xed/0x1f0
 [<ffffffff813546a8>] scsi_error_handler+0x1a8/0x200
 [<ffffffff81354500>] ? scsi_unjam_host+0x1f0/0x1f0
 [<ffffffff8106ec3e>] kthread+0x9e/0xb0
 [<ffffffff81509264>] kernel_thread_helper+0x4/0x10
 [<ffffffff8106eba0>] ? kthread_freezable_should_stop+0x70/0x70
 [<ffffffff81509260>] ? gs_change+0x13/0x13
Code: 25 28 00 00 00 48 89 45 c8 31 c0 48 8b 87 80 00 00 00 48 8d b5 60 ff ff ff 89 d1 48 89 fb 41 89 d6 4c 89 fa 48 8b 80 b8 00 00 00
 <48> 8b 80 50 03 00 00 48 8b 00 48 89 85 38 ff ff ff 48 8b 07 4c
RIP  [<ffffffff81352bb8>] scsi_send_eh_cmnd+0x58/0x3a0
 RSP <ffff88030920dc50>
CR2: 0000000000000350


Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-08 09:40:51 +01:00
..
fc SCSI updates on 20120319 2012-03-22 12:55:29 -07:00
fc_encode.h [SCSI] libfc: Add support for FDMI 2012-02-19 08:08:58 -06:00
fc_frame.h [SCSI] fcoe: remove unused ptype field in fcoe_rcv_info 2011-07-28 12:08:55 +04:00
fcoe_sysfs.h [SCSI] libfcoe: Add fcoe_sysfs 2012-05-23 09:40:09 +01:00
iscsi_if.h [SCSI] qla4xxx: Removed packed attr from struct iscsi_chap_rec 2012-03-27 08:26:35 +01:00
iscsi_proto.h [SCSI] be2iscsi: Get Initiator Name for the iSCSI_Host 2012-04-25 09:29:35 +01:00
Kbuild [SCSI] Unexport scsi/scsi.h from headers_install 2010-05-02 11:45:12 -04:00
libfc.h [SCSI] libfc: Add support for FDMI 2012-02-19 08:08:58 -06:00
libfcoe.h [SCSI] fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs 2012-05-23 09:43:13 +01:00
libiscsi.h [SCSI] libiscsi_tcp: fix max_r2t manipulation 2012-02-19 08:09:00 -06:00
libiscsi_tcp.h [SCSI] libiscsi_tcp: fix max_r2t manipulation 2012-02-19 08:09:00 -06:00
libsas.h [SCSI] libsas: introduce sas_work to fix sas_drain_work vs sas_queue_work 2012-04-23 12:03:39 +01:00
libsrp.h libsrp: fix compile failure 2009-12-30 12:23:27 -08:00
osd_attributes.h [SCSI] libosd: OSD2r05: Attribute definitions 2009-06-10 08:54:07 -05:00
osd_initiator.h treewide: Fix recieve/receive typos 2011-06-24 11:18:57 +02:00
osd_ore.h BUG: headers with BUG/BUG_ON etc. need linux/bug.h 2012-03-04 17:54:34 -05:00
osd_protocol.h [SCSI] libosd: Support for scatter gather write/read commands 2010-10-26 10:42:34 -05:00
osd_sec.h [SCSI] libosd: OSDv1 Headers 2009-03-12 12:58:06 -05:00
osd_sense.h [SCSI] libosd: osd_sense: OSD_CFO_PERMISSIONS 2009-12-04 12:01:44 -06:00
osd_types.h [SCSI] libosd: Support for scatter gather write/read commands 2010-10-26 10:42:34 -05:00
sas.h isci: kill sci_phy_protocol and sci_request_protocol 2012-05-17 12:27:11 -07:00
sas_ata.h [SCSI] libsas, libata: fix start of life for a sas ata_port 2012-04-23 12:11:47 +01:00
scsi.h scsi: update scsi.h with SYNCHRONIZE_CACHE_16 2012-02-25 14:37:46 -08:00
scsi_bsg_fc.h [SCSI] fc-transport: Use packed modifier for fc_bsg_request structure. 2010-01-17 12:36:33 -06:00
scsi_bsg_iscsi.h [SCSI] iscsi class: add bsg support to iscsi class 2011-08-27 08:36:21 -06:00
scsi_cmnd.h [SCSI] Fix NULL dereferences in scsi_cmd_to_driver 2012-07-08 09:40:51 +01:00
scsi_dbg.h [SCSI] Fix device not ready printk 2007-10-12 14:51:56 -04:00
scsi_device.h SCSI & usb-storage: add try_rc_10_first flag 2012-06-22 22:05:31 -07:00
scsi_devinfo.h Merge ../scsi-rc-fixes-2.6 2006-04-14 15:47:45 -05:00
scsi_dh.h [SCSI] scsi_dh: Change the scsidh_activate interface to be asynchronous 2009-12-04 12:00:46 -06:00
scsi_driver.h [SCSI] Handle disk devices which can not process medium access commands 2012-02-19 10:14:52 -06:00
scsi_eh.h [SCSI] scsi_eh_prep_cmnd should save scmd->underflow 2008-07-26 15:14:56 -04:00
scsi_host.h [SCSI] add flag to skip the runtime PM calls on the host 2012-01-08 19:14:57 -05:00
scsi_ioctl.h [PATCH] don't mess with file in scsi_nonblockable_ioctl() 2008-10-21 07:47:28 -04:00
scsi_netlink.h headers: include linux/types.h where appropriate 2012-03-23 16:58:31 -07:00
scsi_netlink_fc.h [SCSI] SCSI & FC transport: extend event vendor id's to 64bits 2006-09-02 15:35:15 -05:00
scsi_scan.h PM/Hibernate: Wait for SCSI devices scan to complete during resume 2009-04-13 11:37:07 -07:00
scsi_tcq.h [SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions 2011-05-24 13:03:56 -04:00
scsi_tgt.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_tgt_if.h [SCSI] tgt: add I_T nexus support 2007-10-12 14:37:50 -04:00
scsi_transport.h BUG: headers with BUG/BUG_ON etc. need linux/bug.h 2012-03-04 17:54:34 -05:00
scsi_transport_fc.h [SCSI] scsi_transport_fc: Getting FC Port Speed in sync with FC-GS 2012-02-19 08:08:57 -06:00
scsi_transport_iscsi.h [SCSI] iscsi_transport: Add support to display CHAP list and delete CHAP entry 2012-02-29 16:55:59 -06:00
scsi_transport_sas.h [SCSI] libsas: fix sas_find_local_phy(), take phy references 2012-02-29 13:01:06 -06:00
scsi_transport_spi.h [SCSI] aic79xx: make driver respect nvram for IU and QAS settings 2009-06-15 10:09:35 -05:00
scsi_transport_srp.h [SCSI] tgt: move tsk_mgmt_response callback to transport class 2007-10-12 14:38:01 -04:00
scsicam.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sg.h sysctl extern cleanup: sg 2010-03-12 15:53:10 -08:00
srp.h IB/srp: Implement SRP_CRED_REQ and SRP_AER_REQ 2010-10-22 22:19:10 -07:00