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
01ec242b
Commit
01ec242b
authored
Aug 27, 2003
by
Jakub Jelínek
Committed by
David S. Miller
Aug 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COMPAT]: Add missing set_fs() calls to {clock,timer}_*() handlers.
parent
ca3af148
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
kernel/compat.c
kernel/compat.c
+10
-4
No files found.
kernel/compat.c
View file @
01ec242b
...
@@ -464,6 +464,7 @@ long compat_timer_settime(timer_t timer_id, int flags,
...
@@ -464,6 +464,7 @@ long compat_timer_settime(timer_t timer_id, int flags,
if
(
get_compat_itimerspec
(
&
newts
,
new
))
if
(
get_compat_itimerspec
(
&
newts
,
new
))
return
-
EFAULT
;
return
-
EFAULT
;
oldfs
=
get_fs
();
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_timer_settime
(
timer_id
,
flags
,
&
newts
,
&
oldts
);
err
=
sys_timer_settime
(
timer_id
,
flags
,
&
newts
,
&
oldts
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
if
(
!
err
&&
old
&&
put_compat_itimerspec
(
old
,
&
oldts
))
if
(
!
err
&&
old
&&
put_compat_itimerspec
(
old
,
&
oldts
))
...
@@ -477,6 +478,7 @@ long compat_timer_gettime(timer_t timer_id, struct compat_itimerspec *setting)
...
@@ -477,6 +478,7 @@ long compat_timer_gettime(timer_t timer_id, struct compat_itimerspec *setting)
mm_segment_t
oldfs
;
mm_segment_t
oldfs
;
struct
itimerspec
ts
;
struct
itimerspec
ts
;
oldfs
=
get_fs
();
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_timer_gettime
(
timer_id
,
&
ts
);
err
=
sys_timer_gettime
(
timer_id
,
&
ts
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
if
(
!
err
&&
put_compat_itimerspec
(
setting
,
&
ts
))
if
(
!
err
&&
put_compat_itimerspec
(
setting
,
&
ts
))
...
@@ -495,6 +497,7 @@ long compat_clock_settime(clockid_t which_clock, struct compat_timespec *tp)
...
@@ -495,6 +497,7 @@ long compat_clock_settime(clockid_t which_clock, struct compat_timespec *tp)
if
(
get_compat_timespec
(
&
ts
,
tp
))
if
(
get_compat_timespec
(
&
ts
,
tp
))
return
-
EFAULT
;
return
-
EFAULT
;
oldfs
=
get_fs
();
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_clock_settime
(
which_clock
,
&
ts
);
err
=
sys_clock_settime
(
which_clock
,
&
ts
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
return
err
;
return
err
;
...
@@ -509,6 +512,7 @@ long compat_clock_gettime(clockid_t which_clock, struct compat_timespec *tp)
...
@@ -509,6 +512,7 @@ long compat_clock_gettime(clockid_t which_clock, struct compat_timespec *tp)
mm_segment_t
oldfs
;
mm_segment_t
oldfs
;
struct
timespec
ts
;
struct
timespec
ts
;
oldfs
=
get_fs
();
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_clock_gettime
(
which_clock
,
&
ts
);
err
=
sys_clock_gettime
(
which_clock
,
&
ts
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
if
(
!
err
&&
put_compat_timespec
(
&
ts
,
tp
))
if
(
!
err
&&
put_compat_timespec
(
&
ts
,
tp
))
...
@@ -525,6 +529,7 @@ long compat_clock_getres(clockid_t which_clock, struct compat_timespec *tp)
...
@@ -525,6 +529,7 @@ long compat_clock_getres(clockid_t which_clock, struct compat_timespec *tp)
mm_segment_t
oldfs
;
mm_segment_t
oldfs
;
struct
timespec
ts
;
struct
timespec
ts
;
oldfs
=
get_fs
();
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_clock_getres
(
which_clock
,
&
ts
);
err
=
sys_clock_getres
(
which_clock
,
&
ts
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
if
(
!
err
&&
put_compat_timespec
(
&
ts
,
tp
))
if
(
!
err
&&
put_compat_timespec
(
&
ts
,
tp
))
...
@@ -547,6 +552,7 @@ long compat_clock_nanosleep(clockid_t which_clock, int flags,
...
@@ -547,6 +552,7 @@ long compat_clock_nanosleep(clockid_t which_clock, int flags,
if
(
get_compat_timespec
(
&
in
,
rqtp
))
if
(
get_compat_timespec
(
&
in
,
rqtp
))
return
-
EFAULT
;
return
-
EFAULT
;
oldfs
=
get_fs
();
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_clock_nanosleep
(
which_clock
,
flags
,
&
in
,
&
out
);
err
=
sys_clock_nanosleep
(
which_clock
,
flags
,
&
in
,
&
out
);
set_fs
(
oldfs
);
set_fs
(
oldfs
);
if
((
err
==
-
ERESTART_RESTARTBLOCK
)
&&
rmtp
&&
if
((
err
==
-
ERESTART_RESTARTBLOCK
)
&&
rmtp
&&
...
...
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