Circular locking (and possible deadlock), when exiting from mplayer -vo fbdev2
Dan Carpenter
dan.carpenter at oracle.com
Wed Jun 6 14:38:12 PDT 2012
Hi Dri devs,
Witold Baryluk <baryluk at 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
More information about the dri-devel
mailing list