[PATCH v2 0/2] scsi: qla4xxx: bound and correct the ISP83xx reset template

From: Yehyeong Lee

Date: Sun Oct 11 2026 - 00:03:17 EST


v1 bounded the ISP83xx reset template read and walk. The review of that
patch raised two further problems, fixed here as a short series.

Patch 1 is the v1 fix with the template size and the per-entry geometry
read through le16_to_cpu() where the bounds are computed. On big-endian
v1 validated a byte-swapped size while the copy and the walk advanced by
the raw value, so the bound did not hold; the two now agree on both
endiannesses. No functional change on little-endian.

Patch 2 fixes the reset-sequence array cursor in
qla4_83xx_poll_read_list() that the same review noted. The cursor is
kept in a local and only written back when it reaches the end of the
array, so every read overwrites the same slot and a later
read-modify-write entry picks up a stale value. This is a correctness
fix; the index stays inside the array.

v1: https://lore.kernel.org/r/20261010181139.1911817-1-yhlee@xxxxxxxxxxxxxxxxxx

Yehyeong Lee (2):
scsi: qla4xxx: bound the ISP83xx reset template to its buffer
scsi: qla4xxx: advance the reset-sequence array cursor in
poll_read_list

drivers/scsi/qla4xxx/ql4_83xx.c | 117 ++++++++++++++++++++++++++------
1 file changed, 95 insertions(+), 22 deletions(-)

--
2.43.0