summaryrefslogtreecommitdiff
path: root/linux-core/drm_fops.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r--linux-core/drm_fops.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index 7fe274a2..a4c76f75 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -373,6 +373,7 @@ int drm_release(struct inode *inode, struct file *filp)
struct drm_file *file_priv = filp->private_data;
struct drm_device *dev = file_priv->minor->dev;
int retcode = 0;
+ unsigned long irqflags;
lock_kernel();
@@ -403,9 +404,11 @@ int drm_release(struct inode *inode, struct file *filp)
*/
do{
- spin_lock(&dev->lock.spinlock);
+ spin_lock_irqsave(&dev->lock.spinlock,
+ irqflags);
locked = dev->lock.idle_has_lock;
- spin_unlock(&dev->lock.spinlock);
+ spin_unlock_irqrestore(&dev->lock.spinlock,
+ irqflags);
if (locked)
break;
schedule();