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
d32fc1e2
Commit
d32fc1e2
authored
Jan 18, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: SO_TIMESTAMP fix from sparc64
parent
63ffe4d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+21
-4
No files found.
arch/ppc64/kernel/sys_ppc32.c
View file @
d32fc1e2
...
@@ -2756,10 +2756,27 @@ static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_up
...
@@ -2756,10 +2756,27 @@ static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_up
__get_user
(
kcmsg32
->
cmsg_type
,
&
ucmsg
->
cmsg_type
);
__get_user
(
kcmsg32
->
cmsg_type
,
&
ucmsg
->
cmsg_type
);
clen64
=
kcmsg32
->
cmsg_len
;
clen64
=
kcmsg32
->
cmsg_len
;
copy_from_user
(
CMSG32_DATA
(
kcmsg32
),
CMSG_DATA
(
ucmsg
),
if
(
kcmsg32
->
cmsg_level
==
SOL_SOCKET
&&
clen64
-
CMSG_ALIGN
(
sizeof
(
*
ucmsg
)));
kcmsg32
->
cmsg_type
==
SO_TIMESTAMP
)
{
clen32
=
((
clen64
-
CMSG_ALIGN
(
sizeof
(
*
ucmsg
)))
+
struct
timeval
tv
;
CMSG32_ALIGN
(
sizeof
(
struct
cmsghdr32
)));
struct
compat_timeval
*
tv32
;
if
(
clen64
!=
CMSG_LEN
(
sizeof
(
struct
timeval
)))
{
kfree
(
workbuf
);
goto
fail
;
}
copy_from_user
(
&
tv
,
CMSG_DATA
(
ucmsg
),
sizeof
(
tv
));
tv32
=
(
struct
compat_timeval
*
)
CMSG32_DATA
(
kcmsg32
);
tv32
->
tv_sec
=
tv
.
tv_sec
;
tv32
->
tv_usec
=
tv
.
tv_usec
;
clen32
=
sizeof
(
*
tv32
)
+
CMSG32_ALIGN
(
sizeof
(
struct
cmsghdr32
));
}
else
{
copy_from_user
(
CMSG32_DATA
(
kcmsg32
),
CMSG_DATA
(
ucmsg
),
clen64
-
CMSG_ALIGN
(
sizeof
(
*
ucmsg
)));
clen32
=
((
clen64
-
CMSG_ALIGN
(
sizeof
(
*
ucmsg
)))
+
CMSG32_ALIGN
(
sizeof
(
struct
cmsghdr32
)));
}
kcmsg32
->
cmsg_len
=
clen32
;
kcmsg32
->
cmsg_len
=
clen32
;
switch
(
kcmsg32
->
cmsg_type
)
{
switch
(
kcmsg32
->
cmsg_type
)
{
...
...
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