diff options
author | Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> | 2017-05-28 23:07:01 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-30 12:15:59 -0400 |
commit | 025d0973a0ec2121c6fd0da59e8cc3829fbb221e (patch) | |
tree | 0482b55e4fa37f08f8b8b8e3f44449a23afd2c9c /Documentation | |
parent | 468b0df61a5146e79f63380ad6c36228fd30619c (diff) |
cxgb4: avoid crash on PCI error recovery path
During PCI error recovery process, specifically on eeh_err_detected()
we might have a NULL netdev struct, hence a direct dereference will
lead to a kernel oops. This was observed with latest upstream kernel
(v4.12-rc2) on Chelsio adapter T422-CR in PowerPC machines.
This patch checks for NULL pointer and avoids the crash, both in
eeh_err_detected() and eeh_resume(). Also, we avoid to trigger
a fatal error or to try disabling interrupts on FW during PCI
error recovery, because: (a) driver might not be able to accurately
access PCI regions in this case, and (b) trigger a fatal error
_during_ the recovery steps is a mistake that could prevent the
recovery path to complete successfully.
Reported-by: Harsha Thyagaraja <hathyaga@in.ibm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions