diff options
| author | Colin Ian King <[email protected]> | 2021-04-07 14:58:40 +0100 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-04-12 23:20:42 -0400 |
| commit | 40fa7394a1ad5706e795823276f2e394cca145d0 (patch) | |
| tree | 63c1040ac55aa0a90c6ea93b6a663763d9c69826 /tools/perf/scripts/python/flamegraph.py | |
| parent | 6f305bf699fe233ef27d80cc29fd1650423c8e74 (diff) | |
scsi: pm80xx: Fix potential infinite loop
The for-loop iterates with a u8 loop counter i and compares this with the
loop upper limit of pm8001_ha->max_q_num which is a u32 type. There is a
potential infinite loop if pm8001_ha->max_q_num is larger than the u8 loop
counter. Fix this by making the loop counter the same type as
pm8001_ha->max_q_num.
[mkp: this is purely theoretical, max_q_num is currently limited to 64]
Link: https://lore.kernel.org/r/[email protected]
Fixes: 65df7d1986a1 ("scsi: pm80xx: Fix chip initialization failure")
Addresses-Coverity: ("Infinite loop")
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions