]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ibmvnic: continue fatal error reset after passive init
authorLijun Pan <ljp@linux.ibm.com>
Wed, 23 Dec 2020 20:49:04 +0000 (14:49 -0600)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Dec 2020 20:56:10 +0000 (12:56 -0800)
Commit a9c23db9ec87 ("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 a4c229cf77a5 ("ibmvnic: fix NULL pointer
dereference in ibmvic_reset_crq") and commit 6dde4e720f81 ("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: a9c23db9ec87 ("ibmvnic: Skip fatal error reset after passive init")
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Link: https://lore.kernel.org/r/20201223204904.12677-1-ljp@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c

index bd0281020d519aee99a92e1ece4ed05b594d3c8c..91ebcde30292cc8ce3c5b38b4b3149c4c0aaeeec 100644 (file)
@@ -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);