summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2016-10-27 16:27:19 +0300
committerDavid S. Miller <davem@davemloft.net>2016-10-29 16:23:48 -0400
commit81d184199e328fdad5633da139a10337327154e0 (patch)
tree78c230e81dbf9033cb603e9a6b870d095208ef70 /drivers/net/ethernet/mellanox/mlx4/en_selftest.c
parent9d2afba058722d40cc02f430229c91611c0e8d16 (diff)
net/mlx4_core: Do not access comm channel if it has not yet been initialized
In the Hypervisor, there are several FW commands which are invoked before the comm channel is initialized (in mlx4_multi_func_init). These include MOD_STAT_CONFIG, QUERY_DEV_CAP, INIT_HCA, and others. If any of these commands fails, say with a timeout, the Hypervisor driver enters the internal error reset flow. In this flow, the driver attempts to notify all slaves via the comm channel that an internal error has occurred. Since the comm channel has not yet been initialized (i.e., mapped via ioremap), this will cause dereferencing a NULL pointer. To fix this, do not access the comm channel in the internal error flow if it has not yet been initialized. Fixes: 55ad359225b2 ("net/mlx4_core: Enable device recovery flow with SRIOV") Fixes: ab9c17a009ee ("mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet") Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_selftest.c')
0 files changed, 0 insertions, 0 deletions