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
5add95d4
Commit
5add95d4
authored
Jan 14, 2009
by
Heiko Carstens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CVE-2009-0029] System call wrappers part 06
Signed-off-by:
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
parent
362e9c07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
kernel/sched.c
kernel/sched.c
+13
-13
No files found.
kernel/sched.c
View file @
5add95d4
...
...
@@ -5126,7 +5126,7 @@ int can_nice(const struct task_struct *p, const int nice)
* sys_setpriority is a more generic, but much slower function that
* does similar things.
*/
asmlinkage
long
sys_nice
(
int
increment
)
SYSCALL_DEFINE1
(
nice
,
int
,
increment
)
{
long
nice
,
retval
;
...
...
@@ -5433,8 +5433,8 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
* @policy: new policy.
* @param: structure containing the new RT priority.
*/
asmlinkage
long
sys_sched_setscheduler
(
pid_t
pid
,
int
policy
,
struct
sched_param
__user
*
param
)
SYSCALL_DEFINE3
(
sched_setscheduler
,
pid_t
,
pid
,
int
,
policy
,
struct
sched_param
__user
*
,
param
)
{
/* negative values for policy are not valid */
if
(
policy
<
0
)
...
...
@@ -5448,7 +5448,7 @@ sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
* @pid: the pid in question.
* @param: structure containing the new RT priority.
*/
asmlinkage
long
sys_sched_setparam
(
pid_t
pid
,
struct
sched_param
__user
*
param
)
SYSCALL_DEFINE2
(
sched_setparam
,
pid_t
,
pid
,
struct
sched_param
__user
*
,
param
)
{
return
do_sched_setscheduler
(
pid
,
-
1
,
param
);
}
...
...
@@ -5457,7 +5457,7 @@ asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param)
* sys_sched_getscheduler - get the policy (scheduling class) of a thread
* @pid: the pid in question.
*/
asmlinkage
long
sys_sched_getscheduler
(
pid_t
pid
)
SYSCALL_DEFINE1
(
sched_getscheduler
,
pid_t
,
pid
)
{
struct
task_struct
*
p
;
int
retval
;
...
...
@@ -5482,7 +5482,7 @@ asmlinkage long sys_sched_getscheduler(pid_t pid)
* @pid: the pid in question.
* @param: structure containing the RT priority.
*/
asmlinkage
long
sys_sched_getparam
(
pid_t
pid
,
struct
sched_param
__user
*
param
)
SYSCALL_DEFINE2
(
sched_getparam
,
pid_t
,
pid
,
struct
sched_param
__user
*
,
param
)
{
struct
sched_param
lp
;
struct
task_struct
*
p
;
...
...
@@ -5600,8 +5600,8 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len,
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to the new cpu mask
*/
asmlinkage
long
sys_sched_setaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
__user
*
user_mask_ptr
)
SYSCALL_DEFINE3
(
sched_setaffinity
,
pid_t
,
pid
,
unsigned
int
,
len
,
unsigned
long
__user
*
,
user_mask_ptr
)
{
cpumask_var_t
new_mask
;
int
retval
;
...
...
@@ -5648,8 +5648,8 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask)
* @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to hold the current cpu mask
*/
asmlinkage
long
sys_sched_getaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
__user
*
user_mask_ptr
)
SYSCALL_DEFINE3
(
sched_getaffinity
,
pid_t
,
pid
,
unsigned
int
,
len
,
unsigned
long
__user
*
,
user_mask_ptr
)
{
int
ret
;
cpumask_var_t
mask
;
...
...
@@ -5678,7 +5678,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
* This function yields the current CPU to other tasks. If there are no
* other threads running on this CPU then this function will return.
*/
asmlinkage
long
sys_sched_yield
(
voi
d
)
SYSCALL_DEFINE0
(
sched_yiel
d
)
{
struct
rq
*
rq
=
this_rq_lock
();
...
...
@@ -5819,7 +5819,7 @@ long __sched io_schedule_timeout(long timeout)
* this syscall returns the maximum rt_priority that can be used
* by a given scheduling class.
*/
asmlinkage
long
sys_sched_get_priority_max
(
int
policy
)
SYSCALL_DEFINE1
(
sched_get_priority_max
,
int
,
policy
)
{
int
ret
=
-
EINVAL
;
...
...
@@ -5844,7 +5844,7 @@ asmlinkage long sys_sched_get_priority_max(int policy)
* this syscall returns the minimum rt_priority that can be used
* by a given scheduling class.
*/
asmlinkage
long
sys_sched_get_priority_min
(
int
policy
)
SYSCALL_DEFINE1
(
sched_get_priority_min
,
int
,
policy
)
{
int
ret
=
-
EINVAL
;
...
...
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