git: drm - Fix lock order reversal
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Nov 18 22:00:10 PST 2016
commit 8ee19f911cc1a8fa496a55fbb3d4e3749cc1363f
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Nov 18 21:55:50 2016 -0800
drm - Fix lock order reversal
* Lock order reversal caused by holding dev_pager_mtx() across
the object->un_pager.devp.ops->cdev_pg_dtor() call. devpgr -> drmslk.
* Move the lock from before to after the call. Holding the mutex shouldn't
be necessary across the call. This also fixes the reversal as devpgr is
no longer held across the call.
* Fixes a lock order reversal against drm_ioctl() which obtains drmslk first
and recurses into a device pager operation which gets devpgr.
* Fix a few other incidental bugs that would normally not be triggered by
the DRM code due to outer locks held by the DRM code. Plus some formatting
fixes.
Summary of changes:
sys/vm/device_pager.c | 33 ++++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8ee19f911cc1a8fa496a55fbb3d4e3749cc1363f
--
DragonFly BSD source repository
More information about the Commits
mailing list