From: Leon Romanovsky <leon@kernel.org>
To: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org,
andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com
Subject: Re: [PATCH rdma-rc 4/4] RDMA/bnxt_re: Fix null pointer dereference in bnxt_re_suspend
Date: Wed, 21 May 2025 13:01:47 +0300 [thread overview]
Message-ID: <20250521100147.GI7435@unreal> (raw)
In-Reply-To: <20250520035910.1061918-5-kalesh-anakkur.purayil@broadcom.com>
On Tue, May 20, 2025 at 09:29:10AM +0530, Kalesh AP wrote:
> There is a possibility that the Ethernet driver invokes bnxt_ulp_stop()
> twice during reset recovery scenario. This will result in a NULL pointer
> dereference in bnxt_re_suspend() as en_info->rdev has been set to NULL
> during the first invocation.
Please fix bnxt_ulp_stop() to do not do that. The fix should be there
and not in bnxt_re.
Thanks
>
> Fixes: dee3da3422d5 ("RDMA/bnxt_re: Change aux driver data to en_info to hold more information")
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
> drivers/infiniband/hw/bnxt_re/main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
> index 293b0a96c8e3..bc0b40073461 100644
> --- a/drivers/infiniband/hw/bnxt_re/main.c
> +++ b/drivers/infiniband/hw/bnxt_re/main.c
> @@ -2410,6 +2410,8 @@ static int bnxt_re_suspend(struct auxiliary_device *adev, pm_message_t state)
> struct bnxt_re_dev *rdev;
>
> rdev = en_info->rdev;
> + if (!rdev)
> + return 0;
> en_dev = en_info->en_dev;
> mutex_lock(&bnxt_re_mutex);
>
> --
> 2.43.5
>
>
next prev parent reply other threads:[~2025-05-21 10:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 3:59 [PATCH rdma-rc 0/4] bnxt_re bug fixes Kalesh AP
2025-05-20 3:59 ` [PATCH rdma-rc 1/4] RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output Kalesh AP
2025-05-20 3:59 ` [PATCH rdma-rc 2/4] RDMA/bnxt_re: Fix missing error handling for tx_queue Kalesh AP
2025-05-20 3:59 ` [PATCH rdma-rc 3/4] RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc Kalesh AP
2025-05-20 3:59 ` [PATCH rdma-rc 4/4] RDMA/bnxt_re: Fix null pointer dereference in bnxt_re_suspend Kalesh AP
2025-05-21 10:01 ` Leon Romanovsky [this message]
2025-05-22 2:39 ` Kalesh Anakkur Purayil
2025-05-21 10:08 ` [PATCH rdma-rc 0/4] bnxt_re bug fixes Leon Romanovsky
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=20250521100147.GI7435@unreal \
--to=leon@kernel.org \
--cc=andrew.gospodarek@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
/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