Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753302AbcLFPGL (ORCPT ); Tue, 6 Dec 2016 10:06:11 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:41262 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752957AbcLFPGJ (ORCPT ); Tue, 6 Dec 2016 10:06:09 -0500 Date: Tue, 06 Dec 2016 10:06:07 -0500 (EST) Message-Id: <20161206.100607.919832811727709338.davem@davemloft.net> To: LinoSanfilippo@gmx.de Cc: bh74.an@samsung.com, ks.giri@samsung.com, vipul.pandya@samsung.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: Avoid deadlock situation due to use of xmit_lock From: David Miller In-Reply-To: <1480719966-12839-1-git-send-email-LinoSanfilippo@gmx.de> References: <1480719966-12839-1-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]); Tue, 06 Dec 2016 06:06:47 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 889 Lines: 18 From: Lino Sanfilippo Date: Sat, 3 Dec 2016 00:06:04 +0100 > after stumbling over a potential deadlock situation in the altera driver > (see http://marc.info/?l=linux-netdev&m=148054615230447&w=2), I checked > all other ethernet drivers for the same issue and actually found it in 2 > more, namely stmmac, and sxgbe. Please see the commit messages for a > description of the problem. > These 2 patches fix the concerning drivers. First of all, I don't want to apply these patches without proper testing and ACKs from the individual driver maintainers. For both of these drivers, this situation only exists because the TX path uses the unnecessary ->tx_lock. This private lock should be removed completely and the driver should use the lock the mid-layer already holds in the transmit path and take it in the TX reclaim path instead of the private ->tx_lock.