Home
last modified time | relevance | path

Searched hist:"53 bb565fc5439f2c8c57a786feea5946804aa3e9" (Results 1 – 1 of 1) sorted by relevance

/linux/arch/x86/pci/
H A Dbroadcom_bus.cdiff 53bb565fc5439f2c8c57a786feea5946804aa3e9 Thu Oct 25 15:52:31 CEST 2018 Colin Ian King <colin.king@canonical.com> 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 <colin.king@canonical.com>
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>