* [PATCH v3 net] ibmvnic: check failover_pending in login response
@ 2021-09-08 16:58 Sukadev Bhattiprolu
2021-09-09 10:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Sukadev Bhattiprolu @ 2021-09-08 16:58 UTC (permalink / raw)
To: netdev; +Cc: Brian King, Dany Madden, Rick Lindsley
If a failover occurs before a login response is received, the login
response buffer maybe undefined. Check that there was no failover
before accessing the login response buffer.
Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
---
Changelog[v3]: Added Fixes tag
Changelog[v2]: Fixed a trivial error in subject line
---
drivers/net/ethernet/ibm/ibmvnic.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index a775c69e4fd7..6aa6ff89a765 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -4700,6 +4700,14 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
return 0;
}
+ if (adapter->failover_pending) {
+ adapter->init_done_rc = -EAGAIN;
+ netdev_dbg(netdev, "Failover pending, ignoring login response\n");
+ complete(&adapter->init_done);
+ /* login response buffer will be released on reset */
+ return 0;
+ }
+
netdev->mtu = adapter->req_mtu - ETH_HLEN;
netdev_dbg(adapter->netdev, "Login Response Buffer:\n");
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 net] ibmvnic: check failover_pending in login response
2021-09-08 16:58 [PATCH v3 net] ibmvnic: check failover_pending in login response Sukadev Bhattiprolu
@ 2021-09-09 10:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-09 10:00 UTC (permalink / raw)
To: Sukadev Bhattiprolu; +Cc: netdev, brking, drt, ricklind
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 8 Sep 2021 09:58:20 -0700 you wrote:
> If a failover occurs before a login response is received, the login
> response buffer maybe undefined. Check that there was no failover
> before accessing the login response buffer.
>
> Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
>
> [...]
Here is the summary with links:
- [v3,net] ibmvnic: check failover_pending in login response
https://git.kernel.org/netdev/net/c/273c29e944bd
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] 2+ messages in thread
end of thread, other threads:[~2021-09-09 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 16:58 [PATCH v3 net] ibmvnic: check failover_pending in login response Sukadev Bhattiprolu
2021-09-09 10:00 ` 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.