Skip to content
Commit 7662fad3 authored by Shannon Nelson's avatar Shannon Nelson Committed by Paolo Abeni
Browse files

ionic: check cmd_regs before copying in or out



Since we now have potential cases of NULL cmd_regs and info_regs
during a reset recovery, and left NULL if a reset recovery has
failed, we need to check that they exist before we use them.
Most of the cases were covered in the original patch where we
verify before doing the ioreadb() for health or cmd status.
However, we need to protect a few uses of io mem that could
be hit in error recovery or asynchronous threads calls as well
(e.g. ethtool or devlink handlers).

Fixes: 219e1832 ("ionic: no fw read when PCI reset failed")
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent a36b0787
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment