Netdev List
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"Mark Bloch" <mbloch@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Vlad Buslov <vladbu@nvidia.com>, Paul Blakey <paulb@nvidia.com>,
	<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Gal Pressman <gal@nvidia.com>,
	Lama Kayal <lkayal@nvidia.com>, Cosmin Ratiu <cratiu@nvidia.com>
Subject: Re: [PATCH net] net/mlx5e: Fix oops from ERR_PTR in act-miss restore teardown
Date: Thu, 11 Jun 2026 18:01:29 +0200	[thread overview]
Message-ID: <c11af82e-0adb-4ebe-a9f1-7c4a543d0a5f@intel.com> (raw)
In-Reply-To: <20260611134836.534015-1-tariqt@nvidia.com>

From: Tariq Toukan <tariqt@nvidia.com>
Date: Thu, 11 Jun 2026 16:48:36 +0300

> From: Lama Kayal <lkayal@nvidia.com>
> 
> Restore-rule creation stores ERR_PTR(errno) in act_id_restore_rule
> on failure.  Teardown still called mlx5_del_flow_rules() with that
> value, which dereferenced it like a real mlx5_flow_handle and could
> crash.
> 
> Clear act_id_restore_rule to NULL in the error branch after
> esw_add_restore_rule() fails so teardown only sees NULL or a valid
> handle.
> 
> Call Trace:
>  ? page_fault+0x1e/0x30
>  ? mlx5_del_flow_rules+0x12/0x140 [mlx5_core]
>  mlx5e_tc_action_miss_mapping_put+0x49/0x50 [mlx5_core]
>  mlx5_tc_ct_delete_flow+0x4d/0x70 [mlx5_core]
>  mlx5_free_flow_attr_actions+0xd2/0x160 [mlx5_core]
>  mlx5e_tc_del_fdb_flow+0x15d/0x210 [mlx5_core]
>  mlx5e_flow_put+0x23/0x40 [mlx5_core]
>  __mlx5e_add_fdb_flow+0xf3/0x430 [mlx5_core]
>  mlx5e_tc_add_flow+0x2ab/0x9c0 [mlx5_core]
>  mlx5e_configure_flower+0x2f4/0x620 [mlx5_core]
>  tc_setup_cb_add+0xca/0x1e0
>  fl_hw_replace_filter+0x143/0x1e0 [cls_flower]
>  [...]
> 
> Fixes: dfa1e46d6093 ("net/mlx5e: TC, Fix using eswitch mapping in nic mode")
> Signed-off-by: Lama Kayal <lkayal@nvidia.com>
> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>

Thanks,
Olek

  reply	other threads:[~2026-06-11 16:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 13:48 [PATCH net] net/mlx5e: Fix oops from ERR_PTR in act-miss restore teardown Tariq Toukan
2026-06-11 16:01 ` Alexander Lobakin [this message]
2026-06-13  1:42 ` Jakub Kicinski

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=c11af82e-0adb-4ebe-a9f1-7c4a543d0a5f@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkayal@nvidia.com \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulb@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=vladbu@nvidia.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