Netdev List
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Guenter Roeck <linux@roeck-us.net>,
	Michael Chan <michael.chan@broadcom.com>
Cc: Pavan Chebbi <pavan.chebbi@broadcom.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [PATCH] bnxt_en: Fix call to hardware monitoring event handler
Date: Fri, 21 Aug 2026 15:19:36 +0100	[thread overview]
Message-ID: <cce99077-b458-4bf8-9bbe-7ed92d3613cf@linux.dev> (raw)
In-Reply-To: <20260821044512.663941-1-linux@roeck-us.net>

On 21/08/2026 05:45, Guenter Roeck wrote:
> The first parameter of hwmon_notify_event() is supposed to be the hardware
> monitoring device. The bnxt driver calls it with the platform device as
> first parameter instead. This API break results in undefined behavior and
> may result in a crash.
> 
> Pass the hardware monitoring device as parameter instead to fix the
> problem.
> 
> Fixes: a19b4801457b0 ("bnxt_en: Event handler for Thermal event")
> Cc: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>   drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c
> index de3427c6c6aa..faed0cf726e1 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c
> @@ -40,7 +40,7 @@ void bnxt_hwmon_notify_event(struct bnxt *bp)
>   		return;
>   	}
>   
> -	hwmon_notify_event(&bp->pdev->dev, hwmon_temp, attr, 0);
> +	hwmon_notify_event(bp->hwmon_dev, hwmon_temp, attr, 0);
>   }
>   
>   static int bnxt_hwrm_temp_query(struct bnxt *bp, u8 *temp)

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>

      parent reply	other threads:[~2026-08-21 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  4:45 [PATCH] bnxt_en: Fix call to hardware monitoring event handler Guenter Roeck
2026-08-21  5:11 ` Kalesh Anakkur Purayil
2026-08-21 14:19 ` Vadim Fedorenko [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=cce99077-b458-4bf8-9bbe-7ed92d3613cf@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pavan.chebbi@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