]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix ethtool selftest crash under error conditions.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 29 Jun 2019 15:16:45 +0000 (11:16 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Jun 2019 23:00:26 +0000 (16:00 -0700)
commit9fe1be73815370c1de4955877d92b8bcdf74317d
treea7b44ae08f0a0bbe37d18de07a5f193150bf58ba
parent704f7af870303de57642dfa82f51c770aef9c356
bnxt_en: Fix ethtool selftest crash under error conditions.

After ethtool loopback packet tests, we re-open the nic for the next
IRQ test.  If the open fails, we must not proceed with the IRQ test
or we will crash with NULL pointer dereference.  Fix it by checking
the bnxt_open_nic() return code before proceeding.

Reported-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Fixes: e84af39b2c7e ("bnxt_en: Add interrupt test to ethtool -t selftest.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c