Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100286
b: refs/heads/master
c: 70ffa16
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 14c0f8e commit 20d0c4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abedd296e97a5d943e76999de97253f1b62a4846
refs/heads/master: 70ffa16e604bab22b12bf72cb7796f1dd01ec335
9 changes: 7 additions & 2 deletions trunk/drivers/char/drm/drm_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "drmP.h"
#include "drm_sarea.h"
#include <linux/poll.h>
#include <linux/smp_lock.h>

static int drm_open_helper(struct inode *inode, struct file *filp,
struct drm_device * dev);
Expand Down Expand Up @@ -174,12 +175,14 @@ int drm_stub_open(struct inode *inode, struct file *filp)

DRM_DEBUG("\n");

/* BKL pushdown: note that nothing else serializes idr_find() */
lock_kernel();
minor = idr_find(&drm_minors_idr, minor_id);
if (!minor)
return -ENODEV;
goto out;

if (!(dev = minor->dev))
return -ENODEV;
goto out;

old_fops = filp->f_op;
filp->f_op = fops_get(&dev->driver->fops);
Expand All @@ -189,6 +192,8 @@ int drm_stub_open(struct inode *inode, struct file *filp)
}
fops_put(old_fops);

out:
unlock_kernel();
return err;
}

Expand Down

0 comments on commit 20d0c4c

Please sign in to comment.