diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:08 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:20 -0500 |
commit | 5add95d4f7cf08f6f62510f19576992912387501 (patch) | |
tree | d12413f415554705d234f0882164d7dc179d10a7 /kernel/sched.c | |
parent | 362e9c07c7220c0a78c88826fc0d2bf7e4a4bb68 (diff) |
[CVE-2009-0029] System call wrappers part 06
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 8be2c13b50d0..1a0fdfa5ddf9 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5126,7 +5126,7 @@ int can_nice(const struct task_struct *p, const int nice) | |||
5126 | * sys_setpriority is a more generic, but much slower function that | 5126 | * sys_setpriority is a more generic, but much slower function that |
5127 | * does similar things. | 5127 | * does similar things. |
5128 | */ | 5128 | */ |
5129 | asmlinkage long sys_nice(int increment) | 5129 | SYSCALL_DEFINE1(nice, int, increment) |
5130 | { | 5130 | { |
5131 | long nice, retval; | 5131 | long nice, retval; |
5132 | 5132 | ||
@@ -5433,8 +5433,8 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | |||
5433 | * @policy: new policy. | 5433 | * @policy: new policy. |
5434 | * @param: structure containing the new RT priority. | 5434 | * @param: structure containing the new RT priority. |
5435 | */ | 5435 | */ |
5436 | asmlinkage long | 5436 | SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, |
5437 | sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | 5437 | struct sched_param __user *, param) |
5438 | { | 5438 | { |
5439 | /* negative values for policy are not valid */ | 5439 | /* negative values for policy are not valid */ |
5440 | if (policy < 0) | 5440 | if (policy < 0) |
@@ -5448,7 +5448,7 @@ sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | |||
5448 | * @pid: the pid in question. | 5448 | * @pid: the pid in question. |
5449 | * @param: structure containing the new RT priority. | 5449 | * @param: structure containing the new RT priority. |
5450 | */ | 5450 | */ |
5451 | asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) | 5451 | SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param) |
5452 | { | 5452 | { |
5453 | return do_sched_setscheduler(pid, -1, param); | 5453 | return do_sched_setscheduler(pid, -1, param); |
5454 | } | 5454 | } |
@@ -5457,7 +5457,7 @@ asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) | |||
5457 | * sys_sched_getscheduler - get the policy (scheduling class) of a thread | 5457 | * sys_sched_getscheduler - get the policy (scheduling class) of a thread |
5458 | * @pid: the pid in question. | 5458 | * @pid: the pid in question. |
5459 | */ | 5459 | */ |
5460 | asmlinkage long sys_sched_getscheduler(pid_t pid) | 5460 | SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid) |
5461 | { | 5461 | { |
5462 | struct task_struct *p; | 5462 | struct task_struct *p; |
5463 | int retval; | 5463 | int retval; |
@@ -5482,7 +5482,7 @@ asmlinkage long sys_sched_getscheduler(pid_t pid) | |||
5482 | * @pid: the pid in question. | 5482 | * @pid: the pid in question. |
5483 | * @param: structure containing the RT priority. | 5483 | * @param: structure containing the RT priority. |
5484 | */ | 5484 | */ |
5485 | asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param __user *param) | 5485 | SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) |
5486 | { | 5486 | { |
5487 | struct sched_param lp; | 5487 | struct sched_param lp; |
5488 | struct task_struct *p; | 5488 | struct task_struct *p; |
@@ -5600,8 +5600,8 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len, | |||
5600 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr | 5600 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr |
5601 | * @user_mask_ptr: user-space pointer to the new cpu mask | 5601 | * @user_mask_ptr: user-space pointer to the new cpu mask |
5602 | */ | 5602 | */ |
5603 | asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, | 5603 | SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len, |
5604 | unsigned long __user *user_mask_ptr) | 5604 | unsigned long __user *, user_mask_ptr) |
5605 | { | 5605 | { |
5606 | cpumask_var_t new_mask; | 5606 | cpumask_var_t new_mask; |
5607 | int retval; | 5607 | int retval; |
@@ -5648,8 +5648,8 @@ out_unlock: | |||
5648 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr | 5648 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr |
5649 | * @user_mask_ptr: user-space pointer to hold the current cpu mask | 5649 | * @user_mask_ptr: user-space pointer to hold the current cpu mask |
5650 | */ | 5650 | */ |
5651 | asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | 5651 | SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, |
5652 | unsigned long __user *user_mask_ptr) | 5652 | unsigned long __user *, user_mask_ptr) |
5653 | { | 5653 | { |
5654 | int ret; | 5654 | int ret; |
5655 | cpumask_var_t mask; | 5655 | cpumask_var_t mask; |
@@ -5678,7 +5678,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | |||
5678 | * This function yields the current CPU to other tasks. If there are no | 5678 | * This function yields the current CPU to other tasks. If there are no |
5679 | * other threads running on this CPU then this function will return. | 5679 | * other threads running on this CPU then this function will return. |
5680 | */ | 5680 | */ |
5681 | asmlinkage long sys_sched_yield(void) | 5681 | SYSCALL_DEFINE0(sched_yield) |
5682 | { | 5682 | { |
5683 | struct rq *rq = this_rq_lock(); | 5683 | struct rq *rq = this_rq_lock(); |
5684 | 5684 | ||
@@ -5819,7 +5819,7 @@ long __sched io_schedule_timeout(long timeout) | |||
5819 | * this syscall returns the maximum rt_priority that can be used | 5819 | * this syscall returns the maximum rt_priority that can be used |
5820 | * by a given scheduling class. | 5820 | * by a given scheduling class. |
5821 | */ | 5821 | */ |
5822 | asmlinkage long sys_sched_get_priority_max(int policy) | 5822 | SYSCALL_DEFINE1(sched_get_priority_max, int, policy) |
5823 | { | 5823 | { |
5824 | int ret = -EINVAL; | 5824 | int ret = -EINVAL; |
5825 | 5825 | ||
@@ -5844,7 +5844,7 @@ asmlinkage long sys_sched_get_priority_max(int policy) | |||
5844 | * this syscall returns the minimum rt_priority that can be used | 5844 | * this syscall returns the minimum rt_priority that can be used |
5845 | * by a given scheduling class. | 5845 | * by a given scheduling class. |
5846 | */ | 5846 | */ |
5847 | asmlinkage long sys_sched_get_priority_min(int policy) | 5847 | SYSCALL_DEFINE1(sched_get_priority_min, int, policy) |
5848 | { | 5848 | { |
5849 | int ret = -EINVAL; | 5849 | int ret = -EINVAL; |
5850 | 5850 | ||