Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753117AbcLFTK7 (ORCPT ); Tue, 6 Dec 2016 14:10:59 -0500 Received: from mout.gmx.net ([212.227.17.21]:56434 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752364AbcLFTK5 (ORCPT ); Tue, 6 Dec 2016 14:10:57 -0500 Subject: Re: Avoid deadlock situation due to use of xmit_lock To: David Miller References: <1480719966-12839-1-git-send-email-LinoSanfilippo@gmx.de> <20161206.100607.919832811727709338.davem@davemloft.net> 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 From: Lino Sanfilippo Message-ID: Date: Tue, 6 Dec 2016 20:10:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161206.100607.919832811727709338.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:/Z1TUpdg+wQy6+eN0DwBUHcKWzA11Uq1n2h/WAs9O20DAAQn0K7 29qTkxBkeinkJITpypV5OD/6ySxRmFstK1mkPuCcPK2UZRpgsGg1gB956fARPqF3D/doksm 9xON5aT2ZM63bOP+uQ6ejLiWHewKBeVrwFfkjWlk36l6zIusWCr9d3AuDG+Q1GMKEM/9voO ZRcdVOUDQa02atBb0hTnA== X-UI-Out-Filterresults: notjunk:1;V01:K0:AiRdRCBay4Y=:l9DEnWEc7JTe4FI6DNEmv1 MSGom8Rq24N24WNFfvsCAJ5m/RarizZHMVWBcDCcd/pl+GlolG43MjsvGwqdqg6/tinzJ1/35 d62b5SXg40Oshru4R/mFCmB1/Wt6/qHWS2FrRUOHilqp3coFijo0I3RDXGquSQ2LGbpOJ1M+b xd0/qLIeZ0s0By/AB1B9R8+9zSDKvOTAdznUwx2ASy6HsL7F2Uels5Ko0Hr0ZNdhTAJbtpaLV oYxfQHic6WADLWm5sJ8oWAHR0awhUuA8WMyqTiGarxjNHzBMYZEIhk438bDDiSyXGsCHc0Oia etUttDtzM5nzpKSYAofYQZlaL58FzydTwkv3TcGX0sJcxynWpaAlE10OGqiASumolUwcpa7Wt GOy1HSPJm+entbeK6D7wuSEKTwU1lUAxUj+rC/1GwFPfX5fAdFyU5PgPN2L4KvdFf7hFXTwWR E7qhWzgdwEPOy4yWt4eO3p/eEWydbgpI5bE5ROPyD4nj6n/XvgmMu1cNWxEL+j3qlLY4nUVDO QErF3lqaoYh7aQBmufnFvavDDSfLX2FF6dc8yAXskNEu/DXSfvpHDzc6w7fgA67xWdjJwor0H BJTYWofnPhw0YNXiFeZECnwvKxntuwCmXTZUuhiroreQj8CU9CcDchlr/wcBVmj943Y2GiHC3 5xkEmHH/2bvw37llio4MZ7gfLh2DC9t03UnEHnLl4gSuU9g7dzXnudShpO5Iht8g2KjrSt1no bnG7lPo7Y06Dj0kvd+NLcN64Nz/F8USLDlzNJWLaaX7WNGlQFiZVjFVJra0I/xQR5t9nxkPBi ifat6s4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 27 Hi, On 06.12.2016 16:06, David Miller wrote: > 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. > Ok, I will prepare a new set of patches to remove those private locks entirely. Regards, Lino