megaraid: fix mega_cmd_done CMDID_INT_CMDS
Subsystems (2)
PATCH 1/1 megaraid: fix mega_cmd_done CMDID_INT_CMDS
When cmdid == CMDID_INT_CMDS, the 'cmds' pointer is NULL but is dereferenced below.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes 0f2bb84d2a68 ("[SCSI] megaraid: simplify internal command handling")
Signed-off-by Danila Chernetsov <[email protected]>
--- drivers/scsi/megaraid.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/megaraid.c +1 -0
@@ -1441,6 +1441,7 @@ mega_cmd_done(adapter_t *adapter, u8 completed[], int nstatus, int status)*/ if (cmdid ==CMDID_INT_CMDS ) { scb = &adapter->int_scb; + cmd = scb->cmd;list_del_init (&scb->list); scb->state =SCB_FREE ;
Signature · 1 line
2.25.1
Martin K. Petersen
AppliedQuoted 5 lines · Danila Chernetsov
When cmdid ==
CMDID_INT_CMDS, the 'cmds' pointer is NULL but is dereferenced below.Found by Linux Verification Center (linuxtesting.org) with SVACE.
Applied to 6.4/scsi-queue, thanks!
[1/1] megaraid: fix mega_cmd_done CMDID_INT_CMDS
https://git.kernel.org/mkp/scsi/c/75cb113cd43f
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering