From: Dan Carpenter <dan.carpenter@oracle.com>
To: dri-devel@lists.freedesktop.org
Cc: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Subject: Re: Circular locking (and possible deadlock), when exiting from mplayer -vo fbdev2
Date: Thu, 7 Jun 2012 00:38:12 +0300 [thread overview]
Message-ID: <20120606213812.GA13539@mwanda> (raw)
In-Reply-To: <4FCE5207.6020501@gmx.de>
Hi Dri devs,
Witold Baryluk <baryluk@smp.if.uj.edu.pl> reported a lockdep splat
to the fbdev list, but apparently that was the wrong list and you
people are the right list to handle this.
Here is the lockdep splat and Witold's config:
http://marc.info/?l=linux-fbdev&m=133883191129462&w=2
I looked into the bug and it turns out there is a lock ordering
problem but I'm not sure how to fix it.
http://marc.info/?l=linux-fbdev&m=133890563322819&w=2
Cut and pasted from that URL:
-----------
The problem is we hold ->mmap_sem when we call fb_release() which
takes the info->lock.
We take the info->lock in do_fb_ioctl() before we call fb_set_var()
which calls drm_fb_helper_set_par() which takes the
mode_config.mutex.
In drm_mode_getresources() we take the mode_config.mutex() and call
put_user() which takes the ->mmap_sem.
So on one CPU we are holding the ->mmap_sem and want the info->lock.
On another CPU we are holding the info->lock and want the
config.mutex. On the other CPU we hold the config.mutex and want
the ->mmap_sem.
Deadlock.
-----------
Could you take a look?
regards,
dan carpenter
prev parent reply other threads:[~2012-06-06 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 17:37 Circular locking (and possible deadlock), when exiting from mplayer -vo fbdev2 Witold Baryluk
2012-06-05 14:10 ` Dan Carpenter
2012-06-05 17:18 ` Witold Baryluk
2012-06-05 18:37 ` Florian Tobias Schandinat
2012-06-06 21:38 ` Dan Carpenter [this message]
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=20120606213812.GA13539@mwanda \
--to=dan.carpenter@oracle.com \
--cc=baryluk@smp.if.uj.edu.pl \
--cc=dri-devel@lists.freedesktop.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 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.