Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
XianxinMao
Linux
提交
5add95d4
L
Linux
项目概览
XianxinMao
/
Linux
12 个月 前同步成功
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5add95d4
编写于
1月 14, 2009
作者:
H
Heiko Carstens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CVE-2009-0029] System call wrappers part 06
Signed-off-by:
N
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
上级
362e9c07
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
kernel/sched.c
kernel/sched.c
+13
-13
未找到文件。
kernel/sched.c
浏览文件 @
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
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录