From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756213AbdCWPiD (ORCPT ); Thu, 23 Mar 2017 11:38:03 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54198 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754855AbdCWPiC (ORCPT ); Thu, 23 Mar 2017 11:38:02 -0400 Date: Thu, 23 Mar 2017 08:37:58 -0700 From: "Paul E. McKenney" To: Johannes Berg Cc: linux-kernel , Nicolai Stange , gregkh Subject: Re: deadlock in synchronize_srcu() in debugfs? Reply-To: paulmck@linux.vnet.ibm.com References: <1490280886.2766.4.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490280886.2766.4.camel@sipsolutions.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17032315-0024-0000-0000-00000224B88C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006835; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00837841; UDB=6.00411935; IPR=6.00615603; BA=6.00005233; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014779; XFM=3.00000013; UTC=2017-03-23 15:37:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032315-0025-0000-0000-000042CAE87A Message-Id: <20170323153758.GE3637@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-23_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703230138 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 23, 2017 at 03:54:46PM +0100, Johannes Berg wrote: > Hi, > > Before I go hunting - has anyone seen a deadlock in synchronize_srcu() > in debugfs_remove() before? We're observing that with our (backported, > but very recent) driver against 4.9 (and 4.10, I think), but there are > no backports of any debugfs things so the backport itself doesn't seem > like a likely problem. > > sysrq-w shows a lot of tasks blocked on various locks (e.g. RTNL), but > the ultimate problem is the wireless stack getting blocked on > debugfs_remove_recursive(), in __synchronize_srcu(), in > wait_for_completion() (while holding lots of locks, hence the other > tasks getting stuck). I have not seen this, but my usual question for __synchronize_srcu() is if some other task is blocked holding srcu_read_lock() for that same srcu_struct. Thanx, Paul