Skip to contentSkip to conversation

ibmvnic: continue fatal error reset after passive init

PATCH Applied Lijun Pan 2 participants 2 messages Dec 23, 2020

Subsystems (4)
lore
Share & tools
lore

Lijun Pan

author
#0 lore raw

PATCH v2 1/1 ibmvnic: continue fatal error reset after passive init

Commit f9c6cea0b385 ("ibmvnic: Skip fatal error reset after passive init") says "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."

The original commit skips a specific reset condition, but that does not fix the problem it claims to fix, and misses a reset condition. The effective fix is commit 0e435befaea4 ("ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq") and commit a0faaa27c716 ("ibmvnic:
fix NULL pointer dereference in reset_sub_crq_queues"). With above two fixes, there are no more crashes seen as described even without the original commit, so I would like to revert the original commit.

Fixes f9c6cea0b385 ("ibmvnic: Skip fatal error reset after passive init")

---
v2: reword the commit message to explain it better.

 drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +1 -2
index b370c88a43f1..237a36040689 100644
@@ -2342,8 +2342,7 @@ static void __ibmvnic_reset(struct work_struct *work)
 				set_current_state(TASK_UNINTERRUPTIBLE);
 				schedule_timeout(60 * HZ);
 			}
-		} else if (!(rwi->reset_reason == VNIC_RESET_FATAL &&
-				adapter->from_passive_init)) {
+		} else {
 			rc = do_reset(adapter, rwi, reset_state);
 		}
 		kfree(rwi);
Signature · 1 line
2.23.0
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 11 lines · On Wed, 23 Dec 2020 14:49:04 -0600 you wrote:

Commit f9c6cea0b385 ("ibmvnic: Skip fatal error reset after passive init") says "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."

[...]

Here is the summary with links:
- [net,v2] ibmvnic: continue fatal error reset after passive init

    https://git.kernel.org/netdev/net/c/1f45dc220667

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html