Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp360326imu; Wed, 7 Nov 2018 19:06:45 -0800 (PST) X-Google-Smtp-Source: AJdET5ddXFWCYU5KbbCz3Pc4R/aUM7WX9+f9zQZaKsIn6lwcbL3Fk2ItvAoQcRr3xPNCYebWIhMg X-Received: by 2002:a17:902:bd8d:: with SMTP id q13-v6mr2891457pls.167.1541646405744; Wed, 07 Nov 2018 19:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541646405; cv=none; d=google.com; s=arc-20160816; b=pdpYkXVsXoDqNzFCfSOtF4WQJO1TlRZROaRD++nL4WAtizjr2CHkVga/01hNq3MRBv lSUDAIpxtNd+k4zxVEAbu0VBhdJN4RnxthFypii2f7SE8V+5688TJhcH71jJg++OeBew j6OEsTJjk+LMg4aF0ai5YvGHRy5ZXs+ESNRIQZrtxTpMqHg/yFblTpsBbMjJQj/oiTkE ylLPf/9FKr+/RRm9sQBLf4DwnWC4+EhyL/RKokxcnI2fhL3rmsWsuHwD9gltZvVuER83 3u1cP3KKll0MN/ECszgtAEm69Xi2bjM9nfw0lgZr0xslj5KZCsEFiDyUD5wU6+q9zFen WSdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:to:from:date; bh=kWv1YZ+Wt4nOzjSE2TtJLnq4I1LDDGXDFwK8kMfZfj0=; b=pjTa4mzDKbrtSFykH8gNVq0/Qin0Polf8lNIiBxnrVgYt4Ju7/AaD4Aqc5soayP9mM E1lo0NssZ83b96n6gl3k6qo7UGi28FtYkzbNuzebOLyuw79hYvRk+7xosFPmKrXAvyCj PVsohTX8ig+DYs0TBd2j/9XNwaE/IitOg2fg452HRXFafGrKV4bY7QFGYGAO+k4kMZAO gCSTYT8INlWbqEhvbF4FxZJ3vbvByfEV2kq73mX9Olz489eyqXrHxw4BiNlPAdsBG0/k dLLVIk/AoZMjZR8DnraBrhmASejVlBDo3NvBSmG0sdmMneJi8dubox1RwGteQQ36/o70 3IHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x187si2322779pgx.241.2018.11.07.19.06.28; Wed, 07 Nov 2018 19:06:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728628AbeKHMjU (ORCPT + 99 others); Thu, 8 Nov 2018 07:39:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37088 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728372AbeKHMjT (ORCPT ); Thu, 8 Nov 2018 07:39:19 -0500 Received: from localhost.localdomain (c-24-4-154-175.hsd1.ca.comcast.net [24.4.154.175]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F12044A4; Thu, 8 Nov 2018 03:05:59 +0000 (UTC) Date: Wed, 7 Nov 2018 19:05:58 -0800 From: Andrew Morton To: kernel test robot , Mikulas Patocka , Linux Memory Management List , linux-kernel@vger.kernel.org, LKP , Tejun Heo , David Rientjes , Christoph Lameter , Joonsoo Kim , Pekka Enberg Subject: Re: [LKP] d50d82faa0 [ 33.671845] WARNING: possible circular locking dependency detected Message-Id: <20181107190558.812375161de4b5df413ea31b@linux-foundation.org> In-Reply-To: <20181107154336.21e1f815226facdffd4a6c54@linux-foundation.org> References: <20181023003004.GH24195@shao2-debian> <20181107154336.21e1f815226facdffd4a6c54@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2018 15:43:36 -0800 Andrew Morton wrote: > On Tue, 23 Oct 2018 08:30:04 +0800 kernel test robot wrote: > > > Greetings, > > > > 0day kernel testing robot got the below dmesg and the first bad commit is > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > > > commit d50d82faa0c964e31f7a946ba8aba7c715ca7ab0 > > Author: Mikulas Patocka > > AuthorDate: Wed Jun 27 23:26:09 2018 -0700 > > Commit: Linus Torvalds > > CommitDate: Thu Jun 28 11:16:44 2018 -0700 > > > > slub: fix failure when we delete and create a slab cache > > This is ugly. Is there an alternative way of fixing the race which > Mikulas attempted to address? Possibly cancel the work and reuse the > existing sysfs file, or is that too stupid to live? > > 3b7b314053d021 ("slub: make sysfs file removal asynchronous") was > pretty lame, really. As mentioned, > > : It'd be the cleanest to deal with the issue by removing sysfs files > : without holding slab_mutex before the rest of shutdown; however, given > : the current code structure, it is pretty difficult to do so. > > Would be a preferable approach. > > > > > This uncovered a bug in the slub subsystem - if we delete a cache and > > immediatelly create another cache with the same attributes, it fails > > because of duplicate filename in /sys/kernel/slab/. The slub subsystem > > offloads freeing the cache to a workqueue - and if we create the new > > cache before the workqueue runs, it complains because of duplicate > > filename in sysfs. Alternatively, could we flush the workqueue before attempting to (re)create the sysfs file? Extra points for only doing this if the first (re)creation attempt returned -EEXIST?