Re: [PATCH] net: ethernet: mediatek: fixed deadlock captured by lockdep

From: David Miller
Date: Tue Jul 04 2017 - 04:44:16 EST


From: <sean.wang@xxxxxxxxxxxx>
Date: Tue, 4 Jul 2017 11:17:36 +0800

> From: Sean Wang <sean.wang@xxxxxxxxxxxx>
>
> Lockdep found an inconsistent lock state when mtk_get_stats64 is called
> in user context while NAPI updates MAC statistics in softirq.
>
> Use spin_trylock_bh/spin_unlock_bh fix following lockdep warning.
...
> Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>

Good catch, applied, thanks.