public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [BUG] lockdep splat with kernfs lockdep annotations and slab mutex from drm patch??
Date: Fri, 14 Jun 2019 08:38:37 -0700	[thread overview]
Message-ID: <20190614153837.GE538958@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <156052491337.7796.17642747687124632554@skylake-alporthouse-com>

Hello,

On Fri, Jun 14, 2019 at 04:08:33PM +0100, Chris Wilson wrote:
> #ifdef CONFIG_MEMCG
>         if (slab_state >= FULL && err >= 0 && is_root_cache(s)) {
>                 struct kmem_cache *c;
> 
>                 mutex_lock(&slab_mutex);
> 
> so it happens to hit the error + FULL case with the additional slabcaches?
> 
> Anyway, according to lockdep, it is dangerous to use the slab_mutex inside
> slab_attr_store().

Didn't really look into the code but it looks like slab_mutex is held
while trying to remove sysfs files.  sysfs file removal flushes
on-going accesses, so if a file operation then tries to grab a mutex
which is held during removal, it leads to a deadlock.

Thanks.

-- 
tejun

  reply	other threads:[~2019-06-14 15:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 13:39 [BUG] lockdep splat with kernfs lockdep annotations and slab mutex from drm patch?? Steven Rostedt
2019-06-14 15:08 ` Chris Wilson
2019-06-14 15:38   ` Tejun Heo [this message]
2019-07-11  2:57     ` Steven Rostedt

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=20190614153837.GE538958@devbig004.ftw2.facebook.com \
    --to=tj@kernel.org \
    --cc=airlied@linux.ie \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tvrtko.ursulin@intel.com \
    /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