On Fri, 2021-12-03 at 03:15 +0500, Ameer Hamza wrote: > Fix for dangling pointer access reported by Coverity. > > Addresses-Coverity: 1494138 ("Use after free") > > Signed-off-by: Ameer Hamza <amhamza.mgc@xxxxxxxxx> > --- > drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c > b/drivers/net/ethernet/mellanox/mlx5/core/health.c > index 3ca998874c50..856023321972 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c > @@ -335,7 +335,7 @@ static int mlx5_health_try_recover(struct > mlx5_core_dev *dev) > { > mlx5_core_warn(dev, "handling bad device here\n"); > mlx5_handle_bad_state(dev); > - if (mlx5_health_wait_pci_up(dev)) { > + if (dev->timeouts && mlx5_health_wait_pci_up(dev)) { the proper fix was already submitted and accepted to net: https://lore.kernel.org/netdev/20211201063709.229103-11-saeed@xxxxxxxxxx/ Thank you