linux/drivers/infiniband
Dan Carpenter 563ca0e9ea RDMA/mana_ib: Prevent array underflow in mana_ib_create_qp_raw()
The "port" comes from the user and if it is zero then the:

	ndev = mc->ports[port - 1];

assignment does an out of bounds read.  I have changed the if
statement to fix this and to mirror how it is done in
mana_ib_create_qp_rss().

Fixes: 0266a17763 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y8/3Vn8qx00kE9Kk@kili
Acked-by: Long Li <longli@microsoft.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2023-02-06 12:59:04 +02:00
..
core RDMA/umem: Use dma-buf locked API to solve deadlock 2023-01-31 10:24:49 -04:00
hw RDMA/mana_ib: Prevent array underflow in mana_ib_create_qp_raw() 2023-02-06 12:59:04 +02:00
sw RDMA/rxe: Prevent faulty rkey generation 2023-01-09 10:48:16 -04:00
ulp IB/IPoIB: Fix legacy IPoIB due to wrong number of queues 2023-01-26 21:18:27 +02:00
Kconfig RDMA: Disable IB HW for UML 2022-12-04 15:22:03 +02:00
Makefile