FROMLIST: net: devinet: Reduce refcount before grace period
Currently, the inetdev_destroy() function waits for an RCU grace period before decrementing the refcount and freeing memory. This causes a delay with a new RCU configuration that tries to save power, which results in the network interface disappearing later than expected. The resulting delay causes test failures on ChromeOS. Refactor the code such that the refcount is freed before the grace period and memory is freed after. With this a ChromeOS network test passes that does 'ip netns del' and polls for an interface disappearing, now passes. Reported-by:Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by:
Eric Dumazet <edumazet@google.com> Signed-off-by:
Joel Fernandes (Google) <joel@joelfernandes.org> Cc: David Ahern <dsahern@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Paolo Abeni <pabeni@redhat.com> Cc: <netdev@vger.kernel.org> Signed-off-by:
Paul E. McKenney <paulmck@kernel.org> (am from https://patchwork.kernel.org/patch/13051742/) (also found at https://lore.kernel.org/r/20221122010421.3799681-16-paulmck@kernel.org ) BUG=b:222463781 TEST=powerIdle lab tests. Signed-off-by:
Joel Fernandes <joelaf@google.com> Signed-off-by:
Parshuram Sangle <parshuram.sangle@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4060455 Reviewed-by:
Ross Zwisler <zwisler@google.com> Reviewed-by:
Sean Paul <sean@poorly.run> Change-Id: Icc86d8df4c3f4c1431e18f3bdb5621941cb62f5f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4069547
Loading
Please sign in to comment