* [PATCH net] gve: use gve_schedule_reset() on AdminQ flow rule timeout
@ 2026-08-06 8:51 Rénich Bon Ćirić
2026-08-06 9:31 ` Przemek Kitszel
2026-08-06 20:28 ` Harshitha Ramamurthy
0 siblings, 2 replies; 4+ messages in thread
From: Rénich Bon Ćirić @ 2026-08-06 8:51 UTC (permalink / raw)
To: netdev
Cc: Joshua Washington, Harshitha Ramamurthy, Jakub Kicinski,
Eric Dumazet, Paolo Abeni, David S . Miller, Andrew Lunn,
Rénich Bon Ćirić
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")
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;
}
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] gve: use gve_schedule_reset() on AdminQ flow rule timeout
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
2026-08-06 20:28 ` Harshitha Ramamurthy
1 sibling, 0 replies; 4+ messages in thread
From: Przemek Kitszel @ 2026-08-06 9:31 UTC (permalink / raw)
To: Rénich Bon Ćirić, netdev
Cc: Joshua Washington, Harshitha Ramamurthy, Jakub Kicinski,
Eric Dumazet, Paolo Abeni, David S . Miller, Andrew Lunn,
Rénich Bon Ćirić
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>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] gve: use gve_schedule_reset() on AdminQ flow rule timeout
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
@ 2026-08-06 20:28 ` Harshitha Ramamurthy
1 sibling, 0 replies; 4+ messages in thread
From: Harshitha Ramamurthy @ 2026-08-06 20:28 UTC (permalink / raw)
To: Rénich Bon Ćirić
Cc: netdev, Joshua Washington, Jakub Kicinski, Eric Dumazet,
Paolo Abeni, David S . Miller, Andrew Lunn,
Rénich Bon Ćirić
On Thu, Aug 6, 2026 at 1:51 AM Rénich Bon Ćirić <renich@evalinux.com> 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")
> Link: https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux/issues/93
Hi Renich,
Did you encounter this issue on the upstream net kernel? Because the
Github issue you have linked is referencing the CentOS Stream 10
kernel version 6.12.0-248.el10.x86_64. We scanned our backend within
Google to see if this reset causing error is encountered on VMs and we
did not see such an occurrence, at least recently. If you ran into
this on a non-upstream kernel, would be great if you could provide
more information on the Github issue or file a support ticket so we
could look into it off the mailing list.
If you did hit this issue on an upstream kernel, could you also please
provide a splat here?
Thanks,
Harshitha
> 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;
> }
> --
> 2.45.2
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAB2Dq3r_e3hS+f7n9d_mJ4Kx5pL1vW4z@mail.gmail.com>]
* Re: [PATCH net] gve: use gve_schedule_reset() on AdminQ flow rule timeout
[not found] <CAB2Dq3r_e3hS+f7n9d_mJ4Kx5pL1vW4z@mail.gmail.com>
@ 2026-08-08 0:21 ` Rénich Bon Ćirić
0 siblings, 0 replies; 4+ messages in thread
From: Rénich Bon Ćirić @ 2026-08-08 0:21 UTC (permalink / raw)
To: Harshitha Ramamurthy
Cc: netdev, Joshua Washington, Jakub Kicinski, Eric Dumazet,
Paolo Abeni, David S . Miller, Andrew Lunn, Przemek Kitszel,
Rénich Bon Ćirić
Issue #93 on GitHub was opened for the CentOS Stream 10 gve_add_napi deadlock, which MR !3007 addresses. The link was included in v1 in error.
However, gve_adminq_configure_flow_rule() calling gve_reset(priv, true) synchronously on AdminQ timeout remains an AB-BA lock inversion bug under ethtool/netlink callbacks.
I have posted [PATCH net v2] with the GitHub link removed, the Fixes tag updated to 57718b60df9b ("gve: Add flow steering adminq commands"), and Przemek Kitszel's Reviewed-by tag added.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-08 0:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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ć
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox