mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
scsi: csiostor: Fix dereference of null pointer rn
The error exit path when rn is NULL ends up deferencing the null pointer rn
via the use of the macro CSIO_INC_STATS. Fix this by adding a new error
return path label after the use of the macro to avoid the deference.
Fixes: a3667aaed5 ("[SCSI] csiostor: Chelsio FCoE offload driver")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20260129155332.196338-1-colin.i.king@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
e17f0d4cc0
commit
1982257570
1 changed files with 2 additions and 1 deletions
|
|
@ -2074,7 +2074,7 @@ csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd)
|
|||
struct csio_scsi_level_data sld;
|
||||
|
||||
if (!rn)
|
||||
goto fail;
|
||||
goto fail_ret;
|
||||
|
||||
csio_dbg(hw, "Request to reset LUN:%llu (ssni:0x%x tgtid:%d)\n",
|
||||
cmnd->device->lun, rn->flowid, rn->scsi_id);
|
||||
|
|
@ -2220,6 +2220,7 @@ fail_ret_ioreq:
|
|||
csio_put_scsi_ioreq_lock(hw, scsim, ioreq);
|
||||
fail:
|
||||
CSIO_INC_STATS(rn, n_lun_rst_fail);
|
||||
fail_ret:
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue