Skip to content

Commit

Permalink
PCI: mobiveil: Integer overflow in IB_WIN_SIZE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Lorenzo Pieralisi committed Jul 26, 2018
1 parent ce397d2 commit 0145620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/controller/pcie-mobiveil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0145620

Please sign in to comment.