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
nexedi
linux
Commits
fbc8a81d
Commit
fbc8a81d
authored
May 15, 2008
by
Jonathan Corbet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UIO: cdev lock_kernel() pushdown
Signed-off-by:
Jonathan Corbet
<
corbet@lwn.net
>
parent
2edbf853
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
drivers/uio/uio.c
drivers/uio/uio.c
+12
-5
No files found.
drivers/uio/uio.c
View file @
fbc8a81d
...
...
@@ -297,12 +297,17 @@ static int uio_open(struct inode *inode, struct file *filep)
struct
uio_listener
*
listener
;
int
ret
=
0
;
lock_kernel
();
idev
=
idr_find
(
&
uio_idr
,
iminor
(
inode
));
if
(
!
idev
)
return
-
ENODEV
;
if
(
!
idev
)
{
ret
=
-
ENODEV
;
goto
out
;
}
if
(
!
try_module_get
(
idev
->
owner
))
return
-
ENODEV
;
if
(
!
try_module_get
(
idev
->
owner
))
{
ret
=
-
ENODEV
;
goto
out
;
}
listener
=
kmalloc
(
sizeof
(
*
listener
),
GFP_KERNEL
);
if
(
!
listener
)
{
...
...
@@ -319,7 +324,7 @@ static int uio_open(struct inode *inode, struct file *filep)
if
(
ret
)
goto
err_infoopen
;
}
unlock_kernel
();
return
0
;
err_infoopen:
...
...
@@ -329,6 +334,8 @@ static int uio_open(struct inode *inode, struct file *filep)
module_put
(
idev
->
owner
);
out:
unlock_kernel
();
return
ret
;
}
...
...
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