mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable
[ Upstream commitb3b1a17538
] In the process of checking whether RDMAv2 is available, the current implementation first sets ini->smcrv2.ib_dev_v2, and then allocates smc buf desc and register rmb, but the latter may fail. In this case, the pointer should be reset. Fixes:e49300a6bf
("net/smc: add listen processing for SMC-Rv2") Signed-off-by: liuyacan <liuyacan@corp.netease.com> Reviewed-by: Karsten Graul <kgraul@linux.ibm.com> Link: https://lore.kernel.org/r/20220525085408.812273-1-liuyacan@corp.netease.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1808f7c9f2
commit
776fcaf860
1 changed files with 1 additions and 0 deletions
|
@ -2136,6 +2136,7 @@ static void smc_find_rdma_v2_device_serv(struct smc_sock *new_smc,
|
|||
|
||||
not_found:
|
||||
ini->smcr_version &= ~SMC_V2;
|
||||
ini->smcrv2.ib_dev_v2 = NULL;
|
||||
ini->check_smcrv2 = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue