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
e10ce27f
Commit
e10ce27f
authored
Aug 27, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch prctl_set_mm_exe_file() to fget_light()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
64e09fa2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
kernel/sys.c
kernel/sys.c
+4
-4
No files found.
kernel/sys.c
View file @
e10ce27f
...
@@ -1790,9 +1790,9 @@ static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
...
@@ -1790,9 +1790,9 @@ static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
{
{
struct
file
*
exe_file
;
struct
file
*
exe_file
;
struct
dentry
*
dentry
;
struct
dentry
*
dentry
;
int
err
;
int
err
,
fput_needed
;
exe_file
=
fget
(
f
d
);
exe_file
=
fget
_light
(
fd
,
&
fput_neede
d
);
if
(
!
exe_file
)
if
(
!
exe_file
)
return
-
EBADF
;
return
-
EBADF
;
...
@@ -1839,12 +1839,12 @@ static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
...
@@ -1839,12 +1839,12 @@ static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
goto
exit_unlock
;
goto
exit_unlock
;
err
=
0
;
err
=
0
;
set_mm_exe_file
(
mm
,
exe_file
);
set_mm_exe_file
(
mm
,
exe_file
);
/* this grabs a reference to exe_file */
exit_unlock:
exit_unlock:
up_write
(
&
mm
->
mmap_sem
);
up_write
(
&
mm
->
mmap_sem
);
exit:
exit:
fput
(
exe_file
);
fput
_light
(
exe_file
,
fput_needed
);
return
err
;
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