From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969957AbdEYRmK (ORCPT ); Thu, 25 May 2017 13:42:10 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:59902 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966879AbdEYRmI (ORCPT ); Thu, 25 May 2017 13:42:08 -0400 Date: Thu, 25 May 2017 13:42:05 -0400 (EDT) Message-Id: <20170525.134205.884395652948196578.davem@davemloft.net> To: jemele@gmail.com Cc: netdev@vger.kernel.org, jemele@google.com, mlindner@marvell.com, stephen@networkplumber.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] sky2: Do not deadlock on sky2_hw_down From: David Miller In-Reply-To: <20170524224353.124692-1-jemele@gmail.com> References: <20170524224353.124692-1-jemele@gmail.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / 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]); Thu, 25 May 2017 10:00:32 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joshua Emele Date: Wed, 24 May 2017 15:43:18 -0700 > From: Joshua Emele > > The sky2_hw_down uses sky2_tx_complete to free pending frames stuck in > the HW queue. Because sky2_hw_down can be called from a process context, > the call to u64_stats_update_begin can result in deadlock. > > Because the statistics do not require update as part of the sky2_hw_down > sequence, prevent the update to avoid the deadlock. I disagree. Taking the interface down should cause events in the statistics to be lost. You're going to have to find a way to fix this without eliding the stats increments. Thanks.