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
5fb15141
Commit
5fb15141
authored
Feb 18, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readdir.c: get rid of the last __put_user(), drop now-useless access_ok()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
82af599b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
fs/readdir.c
fs/readdir.c
+1
-10
No files found.
fs/readdir.c
View file @
5fb15141
...
...
@@ -276,9 +276,6 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd,
};
int
error
;
if
(
!
access_ok
(
dirent
,
count
))
return
-
EFAULT
;
f
=
fdget_pos
(
fd
);
if
(
!
f
.
file
)
return
-
EBADF
;
...
...
@@ -362,9 +359,6 @@ int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
};
int
error
;
if
(
!
access_ok
(
dirent
,
count
))
return
-
EFAULT
;
f
=
fdget_pos
(
fd
);
if
(
!
f
.
file
)
return
-
EBADF
;
...
...
@@ -377,7 +371,7 @@ int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent,
typeof
(
lastdirent
->
d_off
)
d_off
=
buf
.
ctx
.
pos
;
lastdirent
=
(
void
__user
*
)
buf
.
current_dir
-
buf
.
prev_reclen
;
if
(
__
put_user
(
d_off
,
&
lastdirent
->
d_off
))
if
(
put_user
(
d_off
,
&
lastdirent
->
d_off
))
error
=
-
EFAULT
;
else
error
=
count
-
buf
.
count
;
...
...
@@ -537,9 +531,6 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
};
int
error
;
if
(
!
access_ok
(
dirent
,
count
))
return
-
EFAULT
;
f
=
fdget_pos
(
fd
);
if
(
!
f
.
file
)
return
-
EBADF
;
...
...
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