summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNick Child <nnac123@linux.ibm.com>2023-08-10 01:10:38 +0300
committerJakub Kicinski <kuba@kernel.org>2023-08-10 20:36:36 +0300
commit6db541ae279bd4e76dbd939e5fbf298396166242 (patch)
tree0abb3b1ca1299428ef233f165ec24f944a43fa9d /tools
parent23cc5f667453ca7645a24c8d21bf84dbf61107b2 (diff)
downloadlinux-6db541ae279bd4e76dbd939e5fbf298396166242.tar.xz
ibmvnic: Ensure login failure recovery is safe from other resets
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> Link: https://lore.kernel.org/r/20230809221038.51296-5-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions