]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/irdma: Initialize net_type before checking it
authorMustafa Ismail <mustafa.ismail@intel.com>
Tue, 22 Nov 2022 00:44:10 +0000 (18:44 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:33 +0000 (13:32 +0100)
commitafc98bf6ef81b0288fe55db0b9e0ea7cd2f012e1
treea08d1528eb8020c351570a5795f4f0036681985b
parent5c430cf534edf4942c120ad16cba80513f123b9f
RDMA/irdma: Initialize net_type before checking it

[ Upstream commit 76eca065776767e188074f6430e2fdf0f86a4820 ]

The av->net_type is not initialized before it is checked in
irdma_modify_qp_roce. This leads to an incorrect update to the ARP cache
and QP context. RoCEv2 connections might fail as result.

Set the net_type using rdma_gid_attr_network_type.

Fixes: a837664db027 ("RDMA/irdma: Use net_type to check network type")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20221122004410.1471-1-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/irdma/verbs.c