Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
70ffa16e
Commit
70ffa16e
authored
May 15, 2008
by
Jonathan Corbet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm: cdev lock_kernel() pushdown
Signed-off-by:
Jonathan Corbet
<
corbet@lwn.net
>
parent
abedd296
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
drivers/char/drm/drm_fops.c
drivers/char/drm/drm_fops.c
+7
-2
No files found.
drivers/char/drm/drm_fops.c
View file @
70ffa16e
...
...
@@ -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
);
...
...
@@ -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
);
...
...
@@ -189,6 +192,8 @@ int drm_stub_open(struct inode *inode, struct file *filp)
}
fops_put
(
old_fops
);
out:
unlock_kernel
();
return
err
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment