mbox series

[net-internal,v2,0/8] ibmvnic: Fix a race in ibmvnic_probe()

Message ID 20220225040941.1429630-1-sukadev@linux.ibm.com (mailing list archive)
Headers show
Series ibmvnic: Fix a race in ibmvnic_probe() | expand

Message

Sukadev Bhattiprolu Feb. 25, 2022, 4:09 a.m. UTC
If we get a transport (reset) event right after a successful CRQ_INIT
during ibmvnic_probe() but before we set the adapter state to VNIC_PROBED,
we will throw away the reset assuming that the adapter is still in the
probing state. But since the adapter has completed the CRQ_INIT any
subsequent CRQs the we send will be ignored by the vnicserver until
we release/init the CRQ again. This can leave the adapter unconfigured.

While here fix a couple of other bugs that were observed (Patches 1,2,4).

Sukadev Bhattiprolu (8):
  ibmvnic: free reset-work-item when flushing
  ibmvnic: initialize rc before completing wait
  ibmvnic: define flush_reset_queue helper
  ibmvnic: complete init_done on transport events
  ibmvnic: register netdev after init of adapter
  ibmvnic: init init_done_rc earlier
  ibmvnic: clear fop when retrying probe
  ibmvnic: Allow queueing resets during probe

 drivers/net/ethernet/ibm/ibmvnic.c | 183 ++++++++++++++++++++++++-----
 drivers/net/ethernet/ibm/ibmvnic.h |   1 +
 2 files changed, 156 insertions(+), 28 deletions(-)

Comments

Sukadev Bhattiprolu Feb. 25, 2022, 4:17 a.m. UTC | #1
Sukadev Bhattiprolu [sukadev@linux.ibm.com] wrote:
> If we get a transport (reset) event right after a successful CRQ_INIT
> during ibmvnic_probe() but before we set the adapter state to VNIC_PROBED,
> we will throw away the reset assuming that the adapter is still in the
> probing state. But since the adapter has completed the CRQ_INIT any
> subsequent CRQs the we send will be ignored by the vnicserver until
> we release/init the CRQ again. This can leave the adapter unconfigured.
> 
> While here fix a couple of other bugs that were observed (Patches 1,2,4).

Sorry for the noise. Subject line needs a fixup. Please ignore this thread.
Will resend.

Sukadev