diff options
| author | Colin Ian King <colin.king@canonical.com> | 2018-10-25 14:52:31 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-20 10:13:04 +0100 |
| commit | 2f85daf84873df51f533894e50d9c0b80137dca0 (patch) | |
| tree | 7de2ffa867ec0778484bf7c2d7a22b01c4cba35f /scripts/mod/modpost.c | |
| parent | dd307a8d156bf0d2a53bd389f48f90f86d604496 (diff) | |
x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux)
[ Upstream commit 53bb565fc5439f2c8c57a786feea5946804aa3e9 ]
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 <colin.king@canonical.com>
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/mod/modpost.c')
0 files changed, 0 insertions, 0 deletions
