mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-28 17:30:18 +00:00
scst: fix possible NULL dereference in TM code
TM command accessing a non-existing LUN might lead NULL dereference in scst_call_dev_task_mgmt_fn_done(). Reported-By: <Ilan Steinberg <ilan.steinberg@kaminario.com>> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -7393,7 +7393,8 @@ static int scst_mgmt_affected_cmds_done(struct scst_mgmt_cmd *mcmd)
|
||||
case SCST_CLEAR_TASK_SET:
|
||||
case SCST_PR_ABORT_ALL:
|
||||
case SCST_LUN_RESET:
|
||||
scst_call_dev_task_mgmt_fn_done(mcmd, mcmd->mcmd_tgt_dev);
|
||||
if (mcmd->mcmd_tgt_dev != NULL)
|
||||
scst_call_dev_task_mgmt_fn_done(mcmd, mcmd->mcmd_tgt_dev);
|
||||
break;
|
||||
|
||||
case SCST_TARGET_RESET:
|
||||
|
||||
Reference in New Issue
Block a user