]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Avoid client deadlocks when the master disappears.
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 2 Mar 2009 10:10:56 +0000 (11:10 +0100)
committerDave Airlie <airlied@linux.ie>
Mon, 2 Mar 2009 23:50:20 +0000 (09:50 +1000)
commit7b5977b56ba70fcddf16a8cb5c1292091c57a2e6
treedc985f3c861d9490a1b5ffe82583497b6fe64236
parent6d1e4e8c8cb0dcbde8c05be4fcb62c040502fc57
drm: Avoid client deadlocks when the master disappears.

This is done by
1) Wake up lock waiters when we close the master file descriptor.
   Not when the master structure is removed, since the latter
   requires the waiters themselves to release the refcount on the
   master structure -> Deadlock.
2) Send a SIGTERM to all clients waiting for the lock.
   Normally these clients will get a SIGPIPE when the X server dies,
   but clients may also spin trying to grab the DRM lock, without
   getting any sort of notification.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/drm_lock.c
drivers/gpu/drm/drm_stub.c