diff options
author | Colin Ian King <[email protected]> | 2018-10-25 14:52:31 +0100 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2018-11-08 18:01:14 -0600 |
commit | 53bb565fc5439f2c8c57a786feea5946804aa3e9 (patch) | |
tree | efddacc1ac1d82add09e750b821f3649a43fb4e4 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) |
x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux)
In the expression "word1 << 16", word1 starts as u16, but is promoted to a
signed int, then sign-extended to resource_size_t, which is probably not
what was intended. Cast to resource_size_t to avoid the sign extension.
This fixes an identical issue as fixed by commit 0b2d70764bb3 ("x86/PCI:
Fix Broadcom CNB20LE unintended sign extension") back in 2014.
Detected by CoverityScan, CID#138749, 138750 ("Unintended sign extension")
Fixes: 3f6ea84a3035 ("PCI: read memory ranges out of Broadcom CNB20LE host bridge")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions