Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752750AbdFTWAP (ORCPT ); Tue, 20 Jun 2017 18:00:15 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:35073 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752529AbdFTWAN (ORCPT ); Tue, 20 Jun 2017 18:00:13 -0400 Date: Tue, 20 Jun 2017 18:00:11 -0400 From: Tejun Heo To: Andrew Morton Cc: Christoph Lameter , Pekka Enberg , LKML , Linus Torvalds , Vladimir Davydov , David Rientjes , Joonsoo Kim , Steven Rostedt Subject: Re: [PATCH] slub: make sysfs file removal asynchronous Message-ID: <20170620220011.GJ21326@htj.duckdns.org> References: <20170616085507.3cc7d4b8@gandalf.local.home> <20170619203538.GN12062@htj.duckdns.org> <20170619172750.6890df32@gandalf.local.home> <20170620204512.GI21326@htj.duckdns.org> <20170620145814.9eb1b74feaf908c39e9c0de2@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170620145814.9eb1b74feaf908c39e9c0de2@linux-foundation.org> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 27 On Tue, Jun 20, 2017 at 02:58:14PM -0700, Andrew Morton wrote: > On Tue, 20 Jun 2017 16:45:12 -0400 Tejun Heo wrote: > > > bf5eb3de3847 ("slub: separate out sysfs_slab_release() from > > sysfs_slab_remove()") made slub sysfs file removals synchronous to > > kmem_cache shutdown. Unfortunately, this created a possible ABBA > > deadlock between slab_mutex and sysfs draining mechanism triggering > > the following lockdep warning. > > > > ... > > > > Signed-off-by: Tejun Heo > > Reported-by: Steven Rostedt (VMware) > > Tested-by: Steven Rostedt (VMware) > > Fixes: bf5eb3de3847 ("slub: separate out sysfs_slab_release() from sysfs_slab_remove()") > > Do you think we should add cc:stable [4.11+]? I think we'd risk more by backporting it through -stable than keeping the bug there. The bug is very difficult to hit. Writing to a slub sysfs file has to race against kmem_cache destruction and AFAICS all slub sysfs files are for debugging. Thanks. -- tejun