Commit 7ec2bd6
scsi: ufs: mediatek: Fix out-of-bounds access in MCQ IRQ mapping
Address a potential out-of-bounds access issue when accessing
'host->mcq_intr_info[q_index]'. The value of 'q_index' might exceed the
valid array bounds if 'q_index == nr'. Correct condition to 'q_index >=
nr' to prevent accessing invalid memory.
Fixes: 66e26a4 ("scsi: ufs: host: mediatek: Set IRQ affinity policy for MCQ mode")
Cc: [email protected]
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Peter Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>1 parent eea6caf commit 7ec2bd6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
| 821 | + | |
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
| |||
0 commit comments