Skip to content

Commit a54e43f

Browse files
Dan Carpenterbjorn-helgaas
authored andcommitted
PCI: mobiveil: Avoid integer overflow in IB_WIN_SIZE
IB_WIN_SIZE is larger than INT_MAX so we need to cast it to u64. Fixes: 9af6bcb ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent bd91b56 commit a54e43f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/pci/controller/pcie-mobiveil.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
#define CFG_WINDOW_TYPE 0
108108
#define IO_WINDOW_TYPE 1
109109
#define MEM_WINDOW_TYPE 2
110-
#define IB_WIN_SIZE (256 * 1024 * 1024 * 1024)
110+
#define IB_WIN_SIZE ((u64)256 * 1024 * 1024 * 1024)
111111
#define MAX_PIO_WINDOWS 8
112112

113113
/* Parameters for the waiting for link up routine */

0 commit comments

Comments
 (0)