From: Simon Horman <horms@kernel•org>
To: Nick Child <nnac123@linux•ibm.com>
Cc: netdev@vger•kernel.org, haren@linux•ibm.com, ricklind@us•ibm.com,
danymadden@us•ibm.com, tlfalcon@linux•ibm.com,
bjking1@linux•ibm.com
Subject: Re: [PATCH net 5/5] ibmvnic: Ensure login failure recovery is safe from other resets
Date: Sat, 5 Aug 2023 09:20:28 +0200 [thread overview]
Message-ID: <ZM34PDnLW6Ubt4ML@vergenet.net> (raw)
In-Reply-To: <20230803202010.37149-5-nnac123@linux.ibm.com>
On Thu, Aug 03, 2023 at 03:20:10PM -0500, Nick Child wrote:
> If a login request fails, the recovery process should be protected
> against parallel resets. It is a known issue that freeing and
> registering CRQ's in quick succession can result in a failover CRQ from
> the VIOS. Processing a failover during login recovery is dangerous for
> two reasons:
> 1. This will result in two parallel initialization processes, this can
> cause serious issues during login.
> 2. It is possible that the failover CRQ is received but never executed.
> We get notified of a pending failover through a transport event CRQ.
> The reset is not performed until a INIT CRQ request is received.
> Previously, if CRQ init fails during login recovery, then the ibmvnic
> irq is freed and the login process returned error. If failover_pending
> is true (a transport event was received), then the ibmvnic device
> would never be able to process the reset since it cannot receive the
> CRQ_INIT request due to the irq being freed. This leaved the device
> in a inoperable state.
>
> Therefore, the login failure recovery process must be hardened against
> these possible issues. Possible failovers (due to quick CRQ free and
> init) must be avoided and any issues during re-initialization should be
> dealt with instead of being propagated up the stack. This logic is
> similar to that of ibmvnic_probe().
>
> Fixes: dff515a3e71d ("ibmvnic: Harden device login requests")
> Signed-off-by: Nick Child <nnac123@linux•ibm.com>
Reviewed-by: Simon Horman <horms@kernel•org>
next prev parent reply other threads:[~2023-08-05 7:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 20:20 [PATCH net 1/5] ibmvnic: Enforce stronger sanity checks on login response Nick Child
2023-08-03 20:20 ` [PATCH net 2/5] ibmvnic: Unmap DMA login rsp buffer on send login fail Nick Child
2023-08-05 7:19 ` Simon Horman
2023-08-03 20:20 ` [PATCH net 3/5] ibmvnic: Handle DMA unmapping of login buffs in release functions Nick Child
2023-08-05 7:19 ` Simon Horman
2023-08-03 20:20 ` [PATCH net 4/5] ibmvnic: Do partial reset on login failure Nick Child
2023-08-05 7:20 ` Simon Horman
2023-08-03 20:20 ` [PATCH net 5/5] ibmvnic: Ensure login failure recovery is safe from other resets Nick Child
2023-08-05 7:20 ` Simon Horman [this message]
2023-08-08 2:13 ` Jakub Kicinski
2023-08-05 7:18 ` [PATCH net 1/5] ibmvnic: Enforce stronger sanity checks on login response Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZM34PDnLW6Ubt4ML@vergenet.net \
--to=horms@kernel$(echo .)org \
--cc=bjking1@linux$(echo .)ibm.com \
--cc=danymadden@us$(echo .)ibm.com \
--cc=haren@linux$(echo .)ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nnac123@linux$(echo .)ibm.com \
--cc=ricklind@us$(echo .)ibm.com \
--cc=tlfalcon@linux$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox