linux/drivers/scsi/mpt2sas
Sreekanth Reddy 63e359d421 [SCSI] mpt2sas: Fix for kernel panic when driver loads with HBA connected to non LUN 0 configured expander
With some enclosures when LUN 0 is not created but LUN 1 or LUN X is created
then SCSI scan procedure calls target_alloc, slave_alloc call back functions
for LUN 0 and slave_destory() for same LUN 0.

In these kind of cases within slave_destroy, pointer to scsi_target in
_sas_device structure is set to NULL, following which when slave_alloc for
LUN 1 is called then starget would not be set properly for this LUN.
So, scsi_target pointer pointing to NULL value would lead to a crash later
in the discovery procedure.

To solve this issue set the sas_device's scsi_target pointer to scsi_device's
scsi_target if it is NULL earlier in slave_alloc callback function.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-09-03 07:27:52 -07:00
..
mpi [SCSI] mpt2sas: MPI2 Rev X (2.00.16) specifications 2013-09-03 07:27:51 -07:00
Kconfig [SCSI] mpt2sas: 2012 source code copyright 2012-08-24 13:10:25 +04:00
Makefile
mpt2sas_base.c [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00
mpt2sas_base.h [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00
mpt2sas_config.c [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00
mpt2sas_ctl.c [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00
mpt2sas_ctl.h [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00
mpt2sas_debug.h [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00
mpt2sas_scsih.c [SCSI] mpt2sas: Fix for kernel panic when driver loads with HBA connected to non LUN 0 configured expander 2013-09-03 07:27:52 -07:00
mpt2sas_transport.c [SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013 2013-09-03 07:27:51 -07:00