* [PATCH net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable
@ 2022-05-25 8:54 liuyacan
2022-05-25 9:10 ` Karsten Graul
2022-05-26 5:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: liuyacan @ 2022-05-25 8:54 UTC (permalink / raw)
To: kgraul, davem, edumazet, kuba, pabeni
Cc: linux-s390, netdev, linux-kernel, ubraun, liuyacan
From: liuyacan <liuyacan@corp.netease.com>
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: e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2")
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
---
net/smc/af_smc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 45a24d242..540b32d86 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -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;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable
2022-05-25 8:54 [PATCH net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable liuyacan
@ 2022-05-25 9:10 ` Karsten Graul
2022-05-26 5:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Karsten Graul @ 2022-05-25 9:10 UTC (permalink / raw)
To: liuyacan, davem, edumazet, kuba, pabeni
Cc: linux-s390, netdev, linux-kernel, ubraun
On 25/05/2022 10:54, liuyacan@corp.netease.com wrote:
> From: liuyacan <liuyacan@corp.netease.com>
>
> 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: e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2")
> Signed-off-by: liuyacan <liuyacan@corp.netease.com>
> ---
> net/smc/af_smc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> index 45a24d242..540b32d86 100644
> --- a/net/smc/af_smc.c
> +++ b/net/smc/af_smc.c
> @@ -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;
> }
>
Thank you!
Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable
2022-05-25 8:54 [PATCH net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable liuyacan
2022-05-25 9:10 ` Karsten Graul
@ 2022-05-26 5:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-26 5:10 UTC (permalink / raw)
To: None
Cc: kgraul, davem, edumazet, kuba, pabeni, linux-s390, netdev,
linux-kernel, ubraun
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 25 May 2022 16:54:08 +0800 you wrote:
> From: liuyacan <liuyacan@corp.netease.com>
>
> 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.
>
> [...]
Here is the summary with links:
- [net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable
https://git.kernel.org/netdev/net/c/b3b1a17538d3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-26 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 8:54 [PATCH net] net/smc: set ini->smcrv2.ib_dev_v2 to NULL if SMC-Rv2 is unavailable liuyacan
2022-05-25 9:10 ` Karsten Graul
2022-05-26 5:10 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.