[SCSI] mptfusion: sanity check for vdevice pointer is added
Added sanity checks before accessing vdevice and added vdevice->deleted setting for mptfc. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
committed by
James Bottomley
parent
f8c23bde85
commit
08f5c5c23d
@@ -2339,6 +2339,8 @@ mptscsih_slave_destroy(struct scsi_device *sdev)
|
||||
starget = scsi_target(sdev);
|
||||
vtarget = starget->hostdata;
|
||||
vdevice = sdev->hostdata;
|
||||
if (!vdevice)
|
||||
return;
|
||||
|
||||
mptscsih_search_running_cmds(hd, vdevice);
|
||||
vtarget->num_luns--;
|
||||
|
Reference in New Issue
Block a user