Repository navigation
Conversation
Calling gve_reset() synchronously inside gve_adminq_configure_flow_rule() when an AdminQ command times out violates the driver's lock hierarchy and can trigger a hard AB-BA lock inversion deadlock with rtnl_lock when invoked under netlink / ethtool callbacks. Replace direct gve_reset() with gve_schedule_reset() to defer reset execution safely to gve_service_task under the proper lock context. Fixes GoogleCloudPlatform#93 Co-developed-by: Gemini AI <renich+gemini@woralelandia.com> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
|
Hi, I missed this earlier when closing #93 that this patch is trying to fix Issue #93. Could you provide a splat for this particular issue if you encountered it? Like mentioned in Issue #93, we have a fix in progress to fix the following stack track during boot time on modern EL10 / RHEL 10 kernels. But we haven't come across a stack trace related to this particular path through We also scanned our backend to see if the AdminQ was returning this particular error(which indicates programming the one flow steering rule timed out but the AdminQ itself is active for future commands) and we did not see any occurrences of it. If you did hit this issue, would be great if you could give us more information here or file a support ticket. |
|
Hi @hramamurthy12, Thanks for the follow-up! You are correct—linking Issue #93 here was a reference mistake. Issue #93 was originally opened for the CentOS Stream 10 PR #95 was created during a static lock hierarchy audit of the driver's reset paths. Calling Przemek Kitszel reviewed the logic on |
|
Hi, I don't see a need for this patch. The issue the commit message describes can't happen: gve_reset() does not acquire the rtnl_lock(). Also, there is no inner driver lock context that is acquired at this point. The inner driver lock context that the AI is complaining about is possibly priv->adminq_lock but that is already released on error by gve_adminq_execute_cmd(). gve_reset() is also written in such a way that the onus is on the caller to acquire the appropriate locks - either through the ethtool core when calling gve_user_reset()/gve_set_rxnfc() or explicitly by gve_handle_reset(). So a deadlock is not possible. We'd be happy to look at any issue that is reproducible or there is a splat for. As such, since there is no reproducer and we also have info from our backend that this Thanks! |
Summary
Fixes a hard deadlock (AB-BA circular lock inversion) during early boot or driver reset on EL10 / RHEL 10 kernels when AdminQ flow rule configuration times out.
Root Cause
Calling
gve_reset()synchronously insidegve_adminq_configure_flow_rule()when an AdminQ command times out violates the driver's lock hierarchy. When invoked under netlink / ethtool callbacks, this creates a lock inversion deadlock withrtnl_lock.Fix
Replaces direct
gve_reset()withgve_schedule_reset()to defer reset execution safely togve_service_taskunder the proper lock context.Fixes #93
CC: @hramamurthy12 @josh8551021 @jordanrh1 @agarg2008
Co-developed-by: Gemini AI renich+gemini@woralelandia.com
Signed-off-by: Rénich Bon Ćirić renich@woralelandia.com