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
e519423c
Commit
e519423c
authored
Jun 06, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sparc64: readv/writev SuS compliance fix for sparc32 compat.
parent
4658bae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+8
-2
No files found.
arch/sparc64/kernel/sys_sparc32.c
View file @
e519423c
...
...
@@ -1001,7 +1001,7 @@ typedef ssize_t (*iov_fn_t)(struct file *, const struct iovec *, unsigned long,
static
long
do_readv_writev32
(
int
type
,
struct
file
*
file
,
const
struct
iovec32
*
vector
,
u32
count
)
{
unsigned
long
tot_len
;
__kernel_ssize_t32
tot_len
;
struct
iovec
iovstack
[
UIO_FASTIOV
];
struct
iovec
*
iov
=
iovstack
,
*
ivp
;
struct
inode
*
inode
;
...
...
@@ -1031,13 +1031,19 @@ static long do_readv_writev32(int type, struct file *file,
tot_len
=
0
;
i
=
count
;
ivp
=
iov
;
retval
=
-
EINVAL
;
while
(
i
>
0
)
{
u32
len
;
__kernel_ssize_t32
tmp
=
tot_len
;
__kernel_ssize_t32
len
;
u32
buf
;
__get_user
(
len
,
&
vector
->
iov_len
);
__get_user
(
buf
,
&
vector
->
iov_base
);
if
(
len
<
0
)
/* size_t not fittina an ssize_t32 .. */
goto
out
;
tot_len
+=
len
;
if
(
tot_len
<
tmp
)
/* maths overflow on the ssize_t32 */
goto
out
;
ivp
->
iov_base
=
(
void
*
)
A
(
buf
);
ivp
->
iov_len
=
(
__kernel_size_t
)
len
;
vector
++
;
...
...
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