Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760757AbcLBRM4 (ORCPT ); Fri, 2 Dec 2016 12:12:56 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:36798 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753024AbcLBRMx (ORCPT ); Fri, 2 Dec 2016 12:12:53 -0500 Date: Fri, 02 Dec 2016 12:11:54 -0500 (EST) Message-Id: <20161202.121154.2111120437823188386.davem@davemloft.net> To: LinoSanfilippo@gmx.de Cc: vbridger@opensource.altera.com, nios2-dev@lists.rocketboards.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 2/2] net: ethernet: altera: TSE: do not use tx queue lock in tx completion handler From: David Miller In-Reply-To: <1480546112-3099-2-git-send-email-LinoSanfilippo@gmx.de> References: <1480546112-3099-1-git-send-email-LinoSanfilippo@gmx.de> <1480546112-3099-2-git-send-email-LinoSanfilippo@gmx.de> 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]); Fri, 02 Dec 2016 08:12:32 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 17 From: Lino Sanfilippo Date: Wed, 30 Nov 2016 23:48:32 +0100 > The driver already uses its private lock for synchronization between xmit > and xmit completion handler making the additional use of the xmit_lock > unnecessary. > Furthermore the driver does not set NETIF_F_LLTX resulting in xmit to be > called with the xmit_lock held and then taking the private lock while xmit > completion handler does the reverse, first take the private lock, then the > xmit_lock. > Fix these issues by not taking the xmit_lock in the tx completion handler. > > Signed-off-by: Lino Sanfilippo Yeah that could be a nasty deadlock, in fact. Applied, thanks.