linux/drivers/infiniband
Leon Romanovsky 9b6d3bbc13 RDMA/mlx5: Prevent overflow in mmap offset calculations
The cmd and index variables declared as u16 and the result is supposed to
be stored in u64. The C arithmetic rules doesn't promote "(index >> 8) <<
16" to be u64 and leaves the end result to be u16.

Fixes: 7be76bef32 ("IB/mlx5: Introduce VAR object and its alloc/destroy methods")
Link: https://lore.kernel.org/r/20200212072635.682689-10-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-02-13 10:39:23 -04:00
..
core IB/umad: Fix kernel crash while unloading ib_umad 2020-02-13 10:00:50 -04:00
hw RDMA/mlx5: Prevent overflow in mmap offset calculations 2020-02-13 10:39:23 -04:00
sw RDMA/siw: Remove unwanted WARN_ON in siw_cm_llp_data_ready() 2020-02-11 14:33:58 -04:00
ulp RDMA subsystem updates for 5.6 2020-01-31 14:40:36 -08:00
Kconfig RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00