All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Ingo Molnar <mingo@redhat.com>, Ben Skeggs <bskeggs@redhat.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: 4.9-rc1 lockdep warning suggesting a deadlock between nouveau and i915 with prime video outputs active
Date: Thu, 13 Jul 2017 16:01:15 +0200	[thread overview]
Message-ID: <20170713140115.lcsitm2jvwe2trwq@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <2007195d-6663-867a-ecc3-03d2d348fb72@gmail.com>

On Thu, Jul 13, 2017 at 03:57:31PM +0200, Jiri Slaby wrote:

> Hmm, not that easy:
> [  +0.011001] BUG: key ffff8807573ed758 not in .data!
> [  +0.000103] DEBUG_LOCKS_WARN_ON(1)
> [  +0.000012] ------------[ cut here ]------------
> [  +0.000147] WARNING: CPU: 1 PID: 282 at
> ../kernel/locking/lockdep.c:3156 lockdep_init_map+0x4db/0x5e0

> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 6efdba4993fc..3e4dc782812d 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -505,7 +505,9 @@ int drm_dev_init(struct drm_device *dev,
> >  
> >         spin_lock_init(&dev->buf_lock);
> >         spin_lock_init(&dev->event_lock);
> > -       mutex_init(&dev->struct_mutex);
> > +       __mutex_init(&dev->struct_mutex,
> > +                    "struct_mutex",
> > +                    &dev->struct_mutex_class);
> >         mutex_init(&dev->filelist_mutex);
> >         mutex_init(&dev->ctxlist_mutex);
> >         mutex_init(&dev->master_mutex);

Right, its complaining about @dev being dynamically allocated. Keys must
be from static storage in order to guarantee they're not re-used for
something different.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-07-13 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 17:02 4.9-rc1 lockdep warning suggesting a deadlock between nouveau and i915 with prime video outputs active Hans de Goede
2016-11-09 17:26 ` Chris Wilson
2016-11-09 18:36   ` Hans de Goede
2017-07-13 13:57   ` Jiri Slaby
2017-07-13 14:01     ` Peter Zijlstra [this message]
2017-07-13 14:04     ` Chris Wilson
2017-07-13 18:59       ` Daniel Vetter

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=20170713140115.lcsitm2jvwe2trwq@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=jirislaby@gmail.com \
    --cc=mingo@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.