diff options
author | Dan Carpenter | 2018-07-28 00:10:39 +0200 |
---|---|---|
committer | Bjorn Helgaas | 2018-07-28 00:10:39 +0200 |
commit | a54e43f993f8ec2f063b616a0e4d2b09e08d78a5 (patch) | |
tree | bc0e1ef91e97a99c39f656bb14d774598f3b17cc | |
parent | PCI/AER: Work around use-after-free in pcie_do_fatal_recovery() (diff) | |
download | kernel-qcow2-linux-a54e43f993f8ec2f063b616a0e4d2b09e08d78a5.tar.gz kernel-qcow2-linux-a54e43f993f8ec2f063b616a0e4d2b09e08d78a5.tar.xz kernel-qcow2-linux-a54e43f993f8ec2f063b616a0e4d2b09e08d78a5.zip |
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: 9af6bcb11e12 ("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>
-rw-r--r-- | drivers/pci/controller/pcie-mobiveil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 4d6c20e47bed..cf0aa7cee5b0 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -107,7 +107,7 @@ #define CFG_WINDOW_TYPE 0 #define IO_WINDOW_TYPE 1 #define MEM_WINDOW_TYPE 2 -#define IB_WIN_SIZE (256 * 1024 * 1024 * 1024) +#define IB_WIN_SIZE ((u64)256 * 1024 * 1024 * 1024) #define MAX_PIO_WINDOWS 8 /* Parameters for the waiting for link up routine */ |