scsi: qla4xxx: Fix missing dma mapping error in qla4xxx_alloc_pdu()
Subsystems (2)
PATCH 1/1 scsi: qla4xxx: Fix missing dma mapping error in qla4xxx_alloc_pdu()
dma_map_XXX() can fail and should be tested for errors with dma_mapping_error().
Fixes b3a271a94d00 ("[SCSI] qla4xxx: support iscsiadm session mgmt")
Signed-off-by Thomas Fourier <[email protected]>
--- drivers/scsi/qla4xxx/ql4_os.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/scsi/qla4xxx/ql4_os.c +2 -0
@@ -3420,6 +3420,8 @@ static int qla4xxx_alloc_pdu(struct iscsi_task *task, uint8_t opcode) task_data->data_dma =dma_map_single (&ha->pdev->dev, task->data, task->data_count,DMA_TO_DEVICE ); +if (dma_mapping_error (&ha->pdev->dev, task_data->data_dma)) +return -ENOMEM ; } DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n",
Signature · 1 line
2.43.0
Martin K. Petersen
AppliedQuoted 4 lines · Thomas Fourier
dma_map_XXX()can fail and should be tested for errors withdma_mapping_error().
Applied to 6.16/scsi-fixes, thanks!
[1/1] scsi: qla4xxx: Fix missing dma mapping error in qla4xxx_alloc_pdu()
https://git.kernel.org/mkp/scsi/c/00f452a1b084
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering