Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

From: Marek Szyprowski
Date: Tue Feb 27 2018 - 06:00:00 EST


Hi Oliver,

On 2018-02-27 11:37, Oliver Neukum wrote:
Am Dienstag, den 27.02.2018, 08:26 +0100 schrieb Marek Szyprowski:

I've noticed that USBnet/ASIX AX88772B USB driver produces deplock kernel
warning ("inconsistent lock state") on Chromebook2 Peach-PIT board. No
Is that 32 bit?

Yes. ARM 32bit. Exynos5420 SoC (4 x CortexA15 + 4 x CortexA7 big.LITTLE CPUs).

special activity is needed to reproduce this issue, it happens almost
on every boot. ASIX USB ethernet is connected to XHCI USB host controller
on that board. Is it a known issue? Frankly I have no idea where to look
No, it is not known.

to fix it. The same adapter connected to EHCI ports on other boards based
on the same SoC works fine without any warnings.
Odd.

And the log with mentioned warning:

[ÂÂ 17.768040] ================================
[ÂÂ 17.772239] WARNING: inconsistent lock state
[ÂÂ 17.776511] 4.16.0-rc3-next-20180227-00007-g876c53a7493c #453 Not tainted
[ÂÂ 17.783329] --------------------------------
[ÂÂ 17.787580] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[ÂÂ 17.793607] swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
[ÂÂ 17.798751]Â (&syncp->seq#5){?.-.}, at: [<9b22e5f0>]
asix_rx_fixup_internal+0x188/0x288
Looks like this triggers (in usbnet):

    u64_stats_update_begin(&stats64->syncp);
ÂÂÂÂÂÂÂÂstats64->rx_packets++;
ÂÂÂÂÂÂÂÂstats64->rx_bytes += skb->len;
ÂÂÂÂÂÂÂÂu64_stats_update_end(&stats64->syncp);

That I considered to be called under lock.
Could you comment this out for testing?

Yes, commenting this out indeed hides the deplock warning.

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland