mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08: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
a4245323d2
commit
7a2ae008a5
@ -1439,6 +1439,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