Skip to content

Commit 5233e32

Browse files
linmag7martinkpetersen
authored andcommitted
scsi: qla1280: Fix kernel oops when debug level > 2
A null dereference or oops exception will eventually occur when qla1280.c driver is compiled with DEBUG_QLA1280 enabled and ql_debug_level > 2. I think its clear from the code that the intention here is sg_dma_len(s) not length of sg_next(s) when printing the debug info. Signed-off-by: Magnus Lindholm <linmag7@gmail.com> Link: https://lore.kernel.org/r/20250125095033.26188-1-linmag7@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 1a78a56 commit 5233e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/qla1280.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
28672867
dprintk(3, "S/G Segment phys_addr=%x %x, len=0x%x\n",
28682868
cpu_to_le32(upper_32_bits(dma_handle)),
28692869
cpu_to_le32(lower_32_bits(dma_handle)),
2870-
cpu_to_le32(sg_dma_len(sg_next(s))));
2870+
cpu_to_le32(sg_dma_len(s)));
28712871
remseg--;
28722872
}
28732873
dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather "

0 commit comments

Comments
 (0)