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
333306d0
Commit
333306d0
authored
Jul 15, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jul 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch sys32_timer_create() to compat_alloc_user_space()
switched to compat_alloc_user_space(), cleaned up.
parent
8a470649
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
arch/x86_64/ia32/sys_ia32.c
arch/x86_64/ia32/sys_ia32.c
+6
-14
No files found.
arch/x86_64/ia32/sys_ia32.c
View file @
333306d0
...
@@ -1288,28 +1288,20 @@ sys_timer_create(clockid_t which_clock,
...
@@ -1288,28 +1288,20 @@ sys_timer_create(clockid_t which_clock,
long
long
sys32_timer_create
(
u32
clock
,
struct
sigevent32
__user
*
se32
,
timer_t
__user
*
timer_id
)
sys32_timer_create
(
u32
clock
,
struct
sigevent32
__user
*
se32
,
timer_t
__user
*
timer_id
)
{
{
struct
sigevent
se
;
struct
sigevent
__user
*
p
=
NULL
;
mm_segment_t
oldfs
;
long
err
;
if
(
se32
)
{
if
(
se32
)
{
struct
sigevent
se
;
p
=
compat_alloc_user_space
(
sizeof
(
struct
sigevent
));
memset
(
&
se
,
0
,
sizeof
(
struct
sigevent
));
memset
(
&
se
,
0
,
sizeof
(
struct
sigevent
));
if
(
get_user
(
se
.
sigev_value
.
sival_int
,
&
se32
->
sigev_value
)
||
if
(
get_user
(
se
.
sigev_value
.
sival_int
,
&
se32
->
sigev_value
)
||
__get_user
(
se
.
sigev_signo
,
&
se32
->
sigev_signo
)
||
__get_user
(
se
.
sigev_signo
,
&
se32
->
sigev_signo
)
||
__get_user
(
se
.
sigev_notify
,
&
se32
->
sigev_notify
)
||
__get_user
(
se
.
sigev_notify
,
&
se32
->
sigev_notify
)
||
__copy_from_user
(
&
se
.
_sigev_un
.
_pad
,
&
se32
->
payload
,
__copy_from_user
(
&
se
.
_sigev_un
.
_pad
,
&
se32
->
payload
,
sizeof
(
se32
->
payload
)))
sizeof
(
se32
->
payload
))
||
copy_to_user
(
p
,
&
se
,
sizeof
(
se
)))
return
-
EFAULT
;
return
-
EFAULT
;
}
}
if
(
!
access_ok
(
VERIFY_WRITE
,
timer_id
,
sizeof
(
timer_t
)))
return
sys_timer_create
(
clock
,
p
,
timer_id
);
return
-
EFAULT
;
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_timer_create
(
clock
,
se32
?
&
se
:
NULL
,
timer_id
);
set_fs
(
oldfs
);
return
err
;
}
}
long
sys32_fadvise64_64
(
int
fd
,
__u32
offset_low
,
__u32
offset_high
,
long
sys32_fadvise64_64
(
int
fd
,
__u32
offset_low
,
__u32
offset_high
,
...
...
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