mbox series

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

Message ID 20220225062358.1435652-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, 6:23 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

patchwork-bot+netdevbpf@kernel.org Feb. 25, 2022, 11:10 a.m. UTC | #1
Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 24 Feb 2022 22:23:50 -0800 you 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.
> 
> [...]

Here is the summary with links:
  - [net,1/8] ibmvnic: free reset-work-item when flushing
    https://git.kernel.org/netdev/net/c/8d0657f39f48
  - [net,2/8] ibmvnic: initialize rc before completing wait
    https://git.kernel.org/netdev/net/c/765559b10ce5
  - [net,3/8] ibmvnic: define flush_reset_queue helper
    https://git.kernel.org/netdev/net/c/83da53f7e4bd
  - [net,4/8] ibmvnic: complete init_done on transport events
    https://git.kernel.org/netdev/net/c/36491f2df9ad
  - [net,5/8] ibmvnic: register netdev after init of adapter
    https://git.kernel.org/netdev/net/c/570425f8c7c1
  - [net,6/8] ibmvnic: init init_done_rc earlier
    https://git.kernel.org/netdev/net/c/ae16bf15374d
  - [net,7/8] ibmvnic: clear fop when retrying probe
    https://git.kernel.org/netdev/net/c/f628ad531b4f
  - [net,8/8] ibmvnic: Allow queueing resets during probe
    https://git.kernel.org/netdev/net/c/fd98693cb072

You are awesome, thank you!