linux-stable-rt/include/scsi
Krishnasamy, Somasundaram d1e12de804 [SCSI] ses: Avoid kernel panic when lun 0 is not mapped
During device discovery, scsi mid layer sends INQUIRY command to LUN
0. If the LUN 0 is not mapped to host, it creates a temporary
scsi_device with LUN id 0 and sends REPORT_LUNS command to it. After
the REPORT_LUNS succeeds, it walks through the LUN table and adds each
LUN found to sysfs. At the end of REPORT_LUNS lun table scan, it will
delete the temporary scsi_device of LUN 0.

When scsi devices are added to sysfs, it calls add_dev function of all
the registered class interfaces. If ses driver has been registered,
ses_intf_add() of ses module will be called. This function calls
scsi_device_enclosure() to check the inquiry data for EncServ
bit. Since inquiry was not allocated for temporary LUN 0 scsi_device,
it will cause NULL pointer exception.

To fix the problem, sdev->inquiry is checked for NULL before reading it.

Signed-off-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com>
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-03-23 11:36:01 -05:00
..
fc [SCSI] fc: Add GSPN_ID request to header file 2011-02-25 12:02:19 -05:00
Kbuild
fc_encode.h [SCSI] libfc: introduce __fc_fill_fc_hdr that accepts fc_hdr as an argument 2011-02-28 18:32:33 -06:00
fc_frame.h
iscsi_if.h
iscsi_proto.h
libfc.h [SCSI] libfc: introduce LLD event callback 2011-02-12 11:09:04 -06:00
libfcoe.h [SCSI] libfcoe: Move FCOE_MTU definition from fcoe.h to libfcoe.h 2011-02-28 18:33:12 -06:00
libiscsi.h [SCSI] cxgbi: convert to use iscsi_conn_get_addr_param 2011-02-24 12:41:15 -05:00
libiscsi_tcp.h
libsas.h
libsrp.h
osd_attributes.h
osd_initiator.h
osd_protocol.h
osd_sec.h
osd_sense.h
osd_types.h
sas.h
sas_ata.h libsas: convert to libata new error handler 2011-03-02 02:36:45 -05:00
scsi.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2011-03-17 17:54:40 -07:00
scsi_bsg_fc.h
scsi_cmnd.h
scsi_dbg.h
scsi_device.h [SCSI] ses: Avoid kernel panic when lun 0 is not mapped 2011-03-23 11:36:01 -05:00
scsi_devinfo.h
scsi_dh.h
scsi_driver.h
scsi_eh.h
scsi_host.h
scsi_ioctl.h
scsi_netlink.h
scsi_netlink_fc.h
scsi_scan.h
scsi_tcq.h
scsi_tgt.h
scsi_tgt_if.h
scsi_transport.h
scsi_transport_fc.h
scsi_transport_iscsi.h [SCSI] iscsi class: add callout to get iscsi_endpoint values 2011-02-24 12:41:12 -05:00
scsi_transport_sas.h
scsi_transport_spi.h
scsi_transport_srp.h
scsicam.h
sg.h
srp.h