Message ID | 20250421081604.655282-3-bbelyavtsev@usergate.com |
---|---|
State | New |
Headers | show |
Series | aic79xx: Add some non-NULL checks | expand |
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index a4d5376123d3..3595a1e35a69 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c @@ -2998,6 +2998,10 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) ahd_print_path(ahd, scb); printk("Unexpected PKT busfree condition\n"); ahd_dump_card_state(ahd); + if (scb == NULL) { + printk("scb pointer is NULL\n"); + return (1); + } ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A', SCB_GET_LUN(scb), SCB_GET_TAG(scb), ROLE_INITIATOR, CAM_UNEXP_BUSFREE);
If hardware returns invalid scbid scb could be NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Boris Belyavtsev <bbelyavtsev@usergate.com> --- drivers/scsi/aic7xxx/aic79xx_core.c | 4 ++++ 1 file changed, 4 insertions(+)