]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: 53c700: Check that command slot is not NULL
authorAlexandra Diupina <adiupina@astralinux.ru>
Fri, 28 Jul 2023 12:35:21 +0000 (15:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:22:03 +0000 (18:22 +0200)
commit171e117cdc0a13702b7d1fedd875dc0c4a43b7d1
tree39b9f7168cd687104391e7c685bc9075c64b1927
parent7a792b3d888aab2c65389f9f4f9f2f6c000b1a0d
scsi: 53c700: Check that command slot is not NULL

commit 8366d1f1249a0d0bba41d0bd1298d63e5d34c7f7 upstream.

Add a check for the command slot value to avoid dereferencing a NULL
pointer.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Co-developed-by: Vladimir Telezhnikov <vtelezhnikov@astralinux.ru>
Signed-off-by: Vladimir Telezhnikov <vtelezhnikov@astralinux.ru>
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
Link: https://lore.kernel.org/r/20230728123521.18293-1-adiupina@astralinux.ru
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/53c700.c