linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <rong.a.chen@intel.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-kernel@vger.kernel.org, LKP <lkp@01.org>,
	Tejun Heo <tj@kernel.org>, David Rientjes <rientjes@google.com>,
	Christoph Lameter <cl@linux.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Pekka Enberg <penberg@kernel.org>
Subject: Re: [LKP] d50d82faa0 [ 33.671845] WARNING: possible circular locking dependency detected
Date: Wed, 7 Nov 2018 19:05:58 -0800	[thread overview]
Message-ID: <20181107190558.812375161de4b5df413ea31b@linux-foundation.org> (raw)
In-Reply-To: <20181107154336.21e1f815226facdffd4a6c54@linux-foundation.org>

On Wed, 7 Nov 2018 15:43:36 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:

> On Tue, 23 Oct 2018 08:30:04 +0800 kernel test robot <rong.a.chen@intel.com> 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 <mpatocka@redhat.com>
> > AuthorDate: Wed Jun 27 23:26:09 2018 -0700
> > Commit:     Linus Torvalds <torvalds@linux-foundation.org>
> > 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?

  reply	other threads:[~2018-11-08  3:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  0:30 kernel test robot
2018-11-07 23:43 ` Andrew Morton
2018-11-08  3:05   ` Andrew Morton [this message]
2018-11-12 14:29     ` Mikulas Patocka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181107190558.812375161de4b5df413ea31b@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@01.org \
    --cc=mpatocka@redhat.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=rong.a.chen@intel.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox