Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756112AbdCWPgY (ORCPT ); Thu, 23 Mar 2017 11:36:24 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33547 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753202AbdCWPgW (ORCPT ); Thu, 23 Mar 2017 11:36:22 -0400 From: Nicolai Stange To: Johannes Berg Cc: linux-kernel , Nicolai Stange , "Paul E.McKenney" , gregkh Subject: Re: deadlock in synchronize_srcu() in debugfs? References: <1490280886.2766.4.camel@sipsolutions.net> Date: Thu, 23 Mar 2017 16:36:19 +0100 In-Reply-To: <1490280886.2766.4.camel@sipsolutions.net> (Johannes Berg's message of "Thu, 23 Mar 2017 15:54:46 +0100") Message-ID: <87o9ws6m4s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 38 Hi Johannes, On Thu, Mar 23 2017, Johannes Berg wrote: > Before I go hunting - has anyone seen a deadlock in synchronize_srcu() > in debugfs_remove() before? Not yet. How reproducible is this? > We're observing that with our (backported, but very recent) driver > against 4.9 (and 4.10, I think), Do I understand it correctly that this driver has been backported from 4.11-rcX to 4.9/10 and that there isn't any issue with 4.11-rcX? > but there are no backports of any debugfs things so the backport > itself doesn't seem like a likely problem. Right, there haven't been any SRCU related changes to debugfs after 4.8. > 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). Could you share a complete backtrace? For example, is the debugfs_remove_recursive() called from any debugfs file's fops and thus, possibly from within a SRCU read side critical section? Thanks, Nicolai