From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Fix missing register lock in serdes_get_stats Date: Sun, 18 Mar 2018 16:36:31 -0400 (EDT) Message-ID: <20180318.163631.750748793504057329.davem@davemloft.net> References: <20180318182305.24952-1-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, linux-kernel@vger.kernel.org To: f.fainelli@gmail.com Return-path: In-Reply-To: <20180318182305.24952-1-f.fainelli@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Florian Fainelli Date: Sun, 18 Mar 2018 11:23:05 -0700 > We can hit the register lock not held assertion with the following path: ... > mv88e6xxx_get_ethtool_stats() calls mv88e6xxx_get_stats() which calls both > chip->info->ops->stats_get_stats(), which holds the register lock, and > chip->info->ops->serdes_get_stats() which does not. Have > chip->info->ops->serdes_get_stats() be running with the register lock held to > avoid such assertions. > > Fixes: 436fe17d273b ("net: dsa: mv88e6xxx: Allow the SERDES interfaces to have statistics") > Signed-off-by: Florian Fainelli Applied, thanks Florian.