mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@nvidia.com>
To: "amhamza.mgc@gmail.com" <amhamza.mgc@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"leon@kernel.org" <leon@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx5: Fix dangling pointer access
Date: Thu, 2 Dec 2021 22:56:28 +0000	[thread overview]
Message-ID: <c29127290d489ef883aba38e9c471049fd8304fe.camel@nvidia.com> (raw)
In-Reply-To: <20211202221539.113434-1-amhamza.mgc@gmail.com>

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@gmail.com>
> ---
>  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@kernel.org/

Thank you


      reply	other threads:[~2021-12-02 22:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 22:15 Ameer Hamza
2021-12-02 22:56 ` Saeed Mahameed [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c29127290d489ef883aba38e9c471049fd8304fe.camel@nvidia.com \
    --to=saeedm@nvidia.com \
    --cc=amhamza.mgc@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®