diff options
author | Alex Elder <elder@linaro.org> | 2024-02-19 17:40:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-21 14:25:17 +0300 |
commit | d80f8e96d47d7374794a30fbed69be43f3388afc (patch) | |
tree | 98b9891251a18396cad8fc038d8fcea3fa02db57 /net/unix/garbage.c | |
parent | 56667da7399eb19af857e30f41bea89aa6fa812c (diff) | |
download | linux-d80f8e96d47d7374794a30fbed69be43f3388afc.tar.xz |
net: ipa: don't overrun IPA suspend interrupt registers
In newer hardware, IPA supports more than 32 endpoints. Some
registers--such as IPA interrupt registers--represent endpoints
as bits in a 4-byte register, and such registers are repeated as
needed to represent endpoints beyond the first 32.
In ipa_interrupt_suspend_clear_all(), we clear all pending IPA
suspend interrupts by reading all status register(s) and writing
corresponding registers to clear interrupt conditions.
Unfortunately the number of registers to read/write is calculated
incorrectly, and as a result we access *many* more registers than
intended. This bug occurs only when the IPA hardware signals a
SUSPEND interrupt, which happens when a packet is received for an
endpoint (or its underlying GSI channel) that is suspended. This
situation is difficult to reproduce, but possible.
Fix this by correctly computing the number of interrupt registers to
read and write. This is the only place in the code where registers
that map endpoints or channels this way perform this calculation.
Fixes: f298ba785e2d ("net: ipa: add a parameter to suspend registers")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions