From 089b84bacfed2384d8a55d00b6b6eb3b48d24f53 Mon Sep 17 00:00:00 2001 From: Daniel Walker Date: Thu, 10 May 2007 22:22:53 -0700 Subject: [PATCH] --- yaml --- r: 55912 b: refs/heads/master c: 3e88c553db938ad016026375f0545304b9030b42 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/sys.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0bc99fe6ad18..1d03545b9f9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 00b8fd236764e3d5bc1d30dc65e256e283de4c3d +refs/heads/master: 3e88c553db938ad016026375f0545304b9030b42 diff --git a/trunk/kernel/sys.c b/trunk/kernel/sys.c index ec319bbb0bd4..df4c3a8f5df9 100644 --- a/trunk/kernel/sys.c +++ b/trunk/kernel/sys.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -659,7 +660,7 @@ asmlinkage long sys_setpriority(int which, int who, int niceval) int error = -EINVAL; struct pid *pgrp; - if (which > 2 || which < 0) + if (which > PRIO_USER || which < PRIO_PROCESS) goto out; /* normalize: avoid signed division (rounding problems) */ @@ -723,7 +724,7 @@ asmlinkage long sys_getpriority(int which, int who) long niceval, retval = -ESRCH; struct pid *pgrp; - if (which > 2 || which < 0) + if (which > PRIO_USER || which < PRIO_PROCESS) return -EINVAL; read_lock(&tasklist_lock);