Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752180AbdGDIoD (ORCPT ); Tue, 4 Jul 2017 04:44:03 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:46170 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750830AbdGDIoB (ORCPT ); Tue, 4 Jul 2017 04:44:01 -0400 Date: Tue, 04 Jul 2017 01:43:57 -0700 (PDT) Message-Id: <20170704.014357.2098420534003373919.davem@davemloft.net> To: sean.wang@mediatek.com Cc: john@phrozen.org, nbd@openwrt.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH] net: ethernet: mediatek: fixed deadlock captured by lockdep From: David Miller In-Reply-To: <96f5bb5018167e8d327d7613674cc1f2a81fe99f.1499137698.git.sean.wang@mediatek.com> References: <96f5bb5018167e8d327d7613674cc1f2a81fe99f.1499137698.git.sean.wang@mediatek.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 04 Jul 2017 01:44:01 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 411 Lines: 13 From: Date: Tue, 4 Jul 2017 11:17:36 +0800 > From: Sean Wang > > 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 Good catch, applied, thanks.