drm: fix regression in drm locking since BKL removal.
authorArnd Bergmann <arnd@arndb.de>
Thu, 26 Aug 2010 22:55:28 +0000 (08:55 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 26 Aug 2010 23:10:28 +0000 (09:10 +1000)
This locking path needs proper auditing but probably too late for changes at this point for 2.6.36, so lets go with the quick fix, which is to drop the lock around schedule.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_lock.c

index e2f70a516c34412112078131203309c3656622d7..9bf93bc9a32c27798791684ab73512a046e92a9c 100644 (file)
@@ -92,7 +92,9 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
                }
 
                /* Contention */
+               mutex_unlock(&drm_global_mutex);
                schedule();
+               mutex_lock(&drm_global_mutex);
                if (signal_pending(current)) {
                        ret = -EINTR;
                        break;