[X/B/F/G/H/Unstable][SRU][PATCH 0/1] net: napi: remove useless stack trace

Po-Hsu Lin po-hsu.lin at canonical.com
Fri Nov 27 11:47:44 UTC 2020


== SRU Justification ==
Whenever a buggy NAPI driver returns more than its budget, it will
trigger a stack trace warning with:
    WARN_ON_ONCE(work > weight);

The warning message looks like this :
    WARNING: CPU: 2 PID: 0 at /build/linux-hwe-ymdo11/linux-hwe-4.15.0/net/core/dev.c:5672 net_rx_action+0x276/0x3b0

This is not very useful for debugging purpose, since it does not tell
you what's going on there.

== Fix ==
* 427d5838e996 ("net: napi: remove useless stack trace")

This patch will emit a message giving the function name, and a
descriptive message like:
    NAPI poll function ath10k_pci_napi_poll+0x0/0x120 [ath10k_pci] returned 0, exceeding its budget of 64.

This patch is a clean-cherry for all the releases except Xenial.
For Xenial it will need to be applied with -C1

== Test ==
Test kernels can be found here:
https://people.canonical.com/~phlin/kernel/lp-1903596-napi-warnon/

Please note that even though I tried to reproduce this on a XPS 13
9360 mentioned in this bug report that shipped with Atheros QCA6174
[168c:003e] wireless card, but I can't trigger this warning message.
The bug opener is also unable to test this due to some other reasons.

Howeve I did tried to trigger this warning forcibly by putting it
outside the if statement with the test kernels in the following link
to make sure it won't cause some other problem.

https://people.canonical.com/~phlin/kernel/lp-1903596-napi-warnon/force-to-warn/

== Where problems could occur ==
For this bug itself, this patch does not really solve the problem
but it will provide more debug information for developers in the
future (and since this is just a warning message, it should be fine).
We can expect to see more a detailed report against ath10k driver
in the future on launchpad.

Eric Dumazet (1):
  net: napi: remove useless stack trace

 net/core/dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.7.4




More information about the kernel-team mailing list