* [PATCH net] ibmvnic: Skip fatal error reset after passive init
@ 2020-04-30 18:22 Juliet Kim
2020-04-30 20:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Juliet Kim @ 2020-04-30 18:22 UTC (permalink / raw)
To: netdev; +Cc: julietk, tlfalcon, linuxppc-dev
During MTU change, the following events may happen.
Client-driven CRQ initialization fails due to partner’s CRQ closed,
causing client to enqueue a reset task for FATAL_ERROR. Then passive
(server-driven) CRQ initialization succeeds, causing client to
release CRQ and enqueue a reset task for failover. If the passive
CRQ initialization occurs before the FATAL reset task is processed,
the FATAL error reset task would try to access a CRQ message queue
that was freed, causing an oops. The problem may be most likely to
occur during DLPAR add vNIC with a non-default MTU, because the DLPAR
process will automatically issue a change MTU request.
Fix this by not processing fatal error reset if CRQ is passively
initialized after client-driven CRQ initialization fails.
Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 4bd33245bad6..3de549c6c693 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2189,7 +2189,8 @@ static void __ibmvnic_reset(struct work_struct *work)
rc = do_hard_reset(adapter, rwi, reset_state);
rtnl_unlock();
}
- } else {
+ } else if (!(rwi->reset_reason == VNIC_RESET_FATAL &&
+ adapter->from_passive_init)) {
rc = do_reset(adapter, rwi, reset_state);
}
kfree(rwi);
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ibmvnic: Skip fatal error reset after passive init
2020-04-30 18:22 [PATCH net] ibmvnic: Skip fatal error reset after passive init Juliet Kim
@ 2020-04-30 20:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-04-30 20:28 UTC (permalink / raw)
To: julietk; +Cc: netdev, linuxppc-dev, tlfalcon
From: Juliet Kim <julietk@linux.vnet.ibm.com>
Date: Thu, 30 Apr 2020 13:22:11 -0500
> During MTU change, the following events may happen.
> Client-driven CRQ initialization fails due to partner’s CRQ closed,
> causing client to enqueue a reset task for FATAL_ERROR. Then passive
> (server-driven) CRQ initialization succeeds, causing client to
> release CRQ and enqueue a reset task for failover. If the passive
> CRQ initialization occurs before the FATAL reset task is processed,
> the FATAL error reset task would try to access a CRQ message queue
> that was freed, causing an oops. The problem may be most likely to
> occur during DLPAR add vNIC with a non-default MTU, because the DLPAR
> process will automatically issue a change MTU request.
>
> Fix this by not processing fatal error reset if CRQ is passively
> initialized after client-driven CRQ initialization fails.
>
> Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-30 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30 18:22 [PATCH net] ibmvnic: Skip fatal error reset after passive init Juliet Kim
2020-04-30 20:28 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).