Netdev List
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Ben Cressey <ben@cressey.dev>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shahar Shitrit <shshitrit@nvidia.com>,
	Carolina Jubran <cjubran@nvidia.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Will Mortensen <will@extrahop.com>,
	"Jose Fernandez (Anthropic)" <jose.fernandez@linux.dev>
Subject: Re: [PATCH net] Revert "net/mlx5: Add sensor name to temperature event message"
Date: Tue, 1 Sep 2026 13:18:52 +0300	[thread overview]
Message-ID: <20260901101852.GI24140@unreal> (raw)
In-Reply-To: <20260828-b4-mlx5-temp-warn-revert-v1-1-4e2ae5a0351f@cressey.dev>

On Fri, Aug 28, 2026 at 04:55:52AM +0000, Ben Cressey wrote:
> This reverts commit 46fd50cfcc12368bed9ae5257cc3beaea5b3c193.
> 
> print_sensor_names_in_bit_set() passes the sensor index from the
> temperature warning event to hwmon_get_sensor_name(), which uses it
> as an index into temp_channel_desc[]. That array is indexed by hwmon
> channel, not by sensor index: it has one entry per ASIC or platform
> sensor the device reports, plus at most one module sensor
> (module_scount is 0 or 1). Module sensors have index 64 and up, so a
> module temperature warning reads far past the end of the allocation
> and prints whatever memory follows it, up to the next NUL byte, into
> the log.
> 
> The mapping from sensor index to hwmon channel cannot be made
> reliable here: the driver registers at most one module channel, while
> the event can carry bits for other ports' modules, and the bitmap in
> the existing warning already distinguishes the ASIC sensor (bit 0)
> from module sensors (bit 64 and up). Drop the name lookup rather than
> fix the mapping, as suggested in review of an earlier fix [1].
> 
> Fixes: 46fd50cfcc12 ("net/mlx5: Add sensor name to temperature event message")
> Cc: stable@vger.kernel.org
> Suggested-by: Leon Romanovsky <leon@kernel.org>
> Link: https://lore.kernel.org/netdev/20260518112555.GM33515@unreal/
> Reported-by: Will Mortensen <will@extrahop.com>
> Closes: https://lore.kernel.org/netdev/20260512-b4-mlx5-sensor-fix-v2-1-531fee4fd7fd@extrahop.com/
> Link: https://lore.kernel.org/netdev/20260515-b4-mlx5-sensor-fix-v3-1-f537ce191d6c@extrahop.com/ [1]
> Assisted-by: LLM
> Reviewed-by: Jose Fernandez (Anthropic) <jose.fernandez@linux.dev>
> Signed-off-by: Ben Cressey <ben@cressey.dev>
> ---
> The restored warning string intentionally lacks the trailing period
> and newline: this is a pure revert of 46fd50cfcc12, the commit that
> added them.
> 
> Will - happy for you to carry this as v4 if you'd prefer.
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/events.c | 31 +++---------------------
>  drivers/net/ethernet/mellanox/mlx5/core/hwmon.c  |  5 ----
>  drivers/net/ethernet/mellanox/mlx5/core/hwmon.h  |  1 -
>  3 files changed, 3 insertions(+), 34 deletions(-)
> 

Thanks,
Acked-by: Leon Romanovsky <leon@kernel.org>

      parent reply	other threads:[~2026-09-01 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  4:55 [PATCH net] Revert "net/mlx5: Add sensor name to temperature event message" Ben Cressey
2026-08-29  6:24 ` Will Mortensen
2026-09-01 10:18 ` Leon Romanovsky [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=20260901101852.GI24140@unreal \
    --to=leon@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ben@cressey.dev \
    --cc=cjubran@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jose.fernandez@linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=shshitrit@nvidia.com \
    --cc=stable@vger.kernel.org \
    --cc=tariqt@nvidia.com \
    --cc=will@extrahop.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