[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:
Kashyap, Desai
2010-03-18 19:22:45 +05:30
committed by James Bottomley
parent f8c23bde85
commit 08f5c5c23d
3 changed files with 26 additions and 0 deletions

View File

@@ -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--;