diff options
author | Niklas Cassel <niklas.cassel@linaro.org> | 2019-09-04 18:03:38 +0200 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2019-10-15 16:32:17 +0100 |
commit | 1137e61dcb99f7f8b54e77ed83f68b5b485a3e34 (patch) | |
tree | afea8e5176eb2418f6d45fccc820ccdf165cc8b6 /lib/test_overflow.c | |
parent | 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c (diff) |
PCI: dwc: Fix find_next_bit() usage
find_next_bit() takes a parameter of size long, and performs arithmetic
that assumes that the argument is of size long.
Therefore we cannot pass a u32, since this will cause find_next_bit()
to read outside the stack buffer and will produce the following print:
BUG: KASAN: stack-out-of-bounds in find_next_bit+0x38/0xb0
Fixes: 1b497e6493c4 ("PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq()")
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions