mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS
[ Upstream commit75cb113cd4
] When cmdid == CMDID_INT_CMDS, the 'cmds' pointer is NULL but is dereferenced below. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes:0f2bb84d2a
("[SCSI] megaraid: simplify internal command handling") Signed-off-by: Danila Chernetsov <listdansp@mail.ru> Link: https://lore.kernel.org/r/20230317175109.18585-1-listdansp@mail.ru Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bfe67e0563
commit
202048ec1e
@ -1443,6 +1443,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;
|
||||
|
Loading…
Reference in New Issue
Block a user