Commit ab1068d
iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs
When there are 16 or more logical CPUs, we request for
`IWL_MAX_RX_HW_QUEUES` (16) IRQs only as we limit to that number of
IRQs, but later on we compare the number of IRQs returned to
nr_online_cpus+2 instead of max_irqs, the latter being what we
actually asked for. This ends up setting num_rx_queues to 17 which
causes lots of out-of-bounds array accesses later on.
Compare to max_irqs instead, and also add an assertion in case
num_rx_queues > IWM_MAX_RX_HW_QUEUES.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=199551
Fixes: 2e5d4a8 ("iwlwifi: pcie: Add new configuration to enable MSIX")
Signed-off-by: Hao Wei Tee <angelsl@in04.sg>
Tested-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>1 parent 52a1923 commit ab1068d
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1590 | 1590 | | |
1591 | 1591 | | |
1592 | 1592 | | |
1593 | | - | |
| 1593 | + | |
1594 | 1594 | | |
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
1600 | | - | |
| 1599 | + | |
1601 | 1600 | | |
1602 | 1601 | | |
1603 | 1602 | | |
| |||
1623 | 1622 | | |
1624 | 1623 | | |
1625 | 1624 | | |
1626 | | - | |
| 1625 | + | |
1627 | 1626 | | |
1628 | 1627 | | |
1629 | 1628 | | |
1630 | | - | |
| 1629 | + | |
1631 | 1630 | | |
1632 | 1631 | | |
1633 | 1632 | | |
1634 | 1633 | | |
1635 | 1634 | | |
| 1635 | + | |
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
| |||
0 commit comments