Netdev List
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: "Rénich Bon Ćirić" <renich@evalinux.com>, netdev@vger.kernel.org
Cc: "Joshua Washington" <joshwash@google.com>,
	"Harshitha Ramamurthy" <hramamurthy@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"Rénich Bon Ćirić" <renich@woralelandia.com>
Subject: Re: [PATCH net] gve: use gve_schedule_reset() on AdminQ flow rule timeout
Date: Thu, 6 Aug 2026 11:31:36 +0200	[thread overview]
Message-ID: <7aa71389-9d43-4c9f-8b6e-6d1c0663d80e@intel.com> (raw)
In-Reply-To: <20260806085112.385934-1-renich@woralelandia.com>

On 8/6/26 10:51, Rénich Bon Ćirić wrote:
> When an AdminQ command to configure a flow rule times out in
> gve_adminq_configure_flow_rule(), the driver currently calls
> gve_reset(priv, true) synchronously.
> 
> When flow rule configuration is invoked under netlink or ethtool
> callbacks, gve_reset() attempts to acquire rtnl_lock while already
> executing within an inner driver lock context. This violates the driver's
> lock hierarchy and causes an AB-BA circular lock inversion deadlock.
> 
> Resolve this lock inversion by replacing synchronous gve_reset() with
> gve_schedule_reset(). This defers reset execution safely to
> gve_service_task out-of-band under the proper lock ordering.
> 
> Fixes: 8ffade77b633 ("gve: Flow steering trigger reset only for timeout error")

this is not the commit that introduced the bug

initial implementation was in commit 57718b60df9b ("gve: Add flow 
steering adminq commands"), so this could be used as "wrong code intro",
but likely it was the addition of netdev_lock() around ethtool call,
that exposed the issue, and should be the actual Fixes tag

> Link: https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux/issues/93
> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
> ---
>   drivers/net/ethernet/google/gve/gve_adminq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
> index 08587bf12345..2037b1767890 100644
> --- a/drivers/net/ethernet/google/gve/gve_adminq.c
> +++ b/drivers/net/ethernet/google/gve/gve_adminq.c
> @@ -1322,7 +1322,7 @@ gve_adminq_configure_flow_rule(struct gve_priv *priv,
>   
>   	if (err == -ETIME) {
>   		dev_err(&priv->pdev->dev, "Timeout to configure the flow rule, trigger reset");
> -		gve_reset(priv, true);
> +		gve_schedule_reset(priv);
>   	} else if (!err) {
>   		priv->flow_rules_cache.rules_cache_synced = false;
>   	}

code looks good, after updating Fixes tag, feel free to add my:
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

  reply	other threads:[~2026-08-06  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  8:51 [PATCH net] gve: use gve_schedule_reset() on AdminQ flow rule timeout Rénich Bon Ćirić
2026-08-06  9:31 ` Przemek Kitszel [this message]
2026-08-06 20:28 ` Harshitha Ramamurthy
     [not found] <CAB2Dq3r_e3hS+f7n9d_mJ4Kx5pL1vW4z@mail.gmail.com>
2026-08-08  0:21 ` Rénich Bon Ćirić

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=7aa71389-9d43-4c9f-8b6e-6d1c0663d80e@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hramamurthy@google.com \
    --cc=joshwash@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=renich@evalinux.com \
    --cc=renich@woralelandia.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