netdev_wait_allrefs() issues a warning if refcount does not drop to 0
after 10 seconds. While 10 second wait generally should not happen
under normal workload in normal environment, it seems to fire falsely
very often during fuzzing and/or in qemu emulation (~10x slower).
At least it's not possible to understand if it's really a false
positive or not. Automated testing generally bumps all timeouts
to very high values to avoid flake failures.
Make the timeout configurable for automated testing systems.
Lowering the timeout may also be useful for e.g. manual bisection.
The default value matches the current behavior.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=211877
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
net/Kconfig | 12 ++++++++++++
net/core/dev.c | 4 +++-
2 files changed, 15 insertions(+), 1 deletion(-)
@@ -461,6 +461,18 @@ config ETHTOOL_NETLINKnetlink.Itprovidesbetterextensibilityandsomenewfeatures,e.g.notificationmessages.+configUNREGISTER_NETDEV_TIMEOUT+int"Unregister network device timeout in seconds"+default10+range03600+help+Thisoptioncontrolsthetimeout(inseconds)usedtoissue+awarningwhilewaitingforanetworkdevicerefcounttodropto0+duringdeviceunregistration.+Alowervaluemaybeusefulduringbisectiontodetectaleaked+referencefaster.Alargervaluemaybeusefultopreventfalse+warningsonslow/loadedsystems.+endif# if NET# Used by archs to tell that they support BPF JIT compiler plus which flavour.
From: Leon Romanovsky <leon@kernel.org> Date: 2021-03-21 08:35:58
On Sat, Mar 20, 2021 at 03:28:51PM +0100, Dmitry Vyukov wrote:
netdev_wait_allrefs() issues a warning if refcount does not drop to 0
after 10 seconds. While 10 second wait generally should not happen
under normal workload in normal environment, it seems to fire falsely
very often during fuzzing and/or in qemu emulation (~10x slower).
At least it's not possible to understand if it's really a false
positive or not. Automated testing generally bumps all timeouts
to very high values to avoid flake failures.
Make the timeout configurable for automated testing systems.
Lowering the timeout may also be useful for e.g. manual bisection.
The default value matches the current behavior.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=211877
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
net/Kconfig | 12 ++++++++++++
net/core/dev.c | 4 +++-
2 files changed, 15 insertions(+), 1 deletion(-)
Our verification team would like to see this change too.
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
netdev_wait_allrefs() issues a warning if refcount does not drop to 0
after 10 seconds. While 10 second wait generally should not happen
under normal workload in normal environment, it seems to fire falsely
very often during fuzzing and/or in qemu emulation (~10x slower).
At least it's not possible to understand if it's really a false
positive or not. Automated testing generally bumps all timeouts
to very high values to avoid flake failures.
Make the timeout configurable for automated testing systems.
Lowering the timeout may also be useful for e.g. manual bisection.
The default value matches the current behavior.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=211877
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
I'd say a sysctl knob is much better than a compile time setting for this.
That way stock kernels can be used in these testing scenerios.
Thanks.
netdev_wait_allrefs() issues a warning if refcount does not drop to 0
after 10 seconds. While 10 second wait generally should not happen
under normal workload in normal environment, it seems to fire falsely
very often during fuzzing and/or in qemu emulation (~10x slower).
At least it's not possible to understand if it's really a false
positive or not. Automated testing generally bumps all timeouts
to very high values to avoid flake failures.
Make the timeout configurable for automated testing systems.
Lowering the timeout may also be useful for e.g. manual bisection.
The default value matches the current behavior.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=211877
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
I'd say a sysctl knob is much better than a compile time setting for this.
That way stock kernels can be used in these testing scenerios.