Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55912
b: refs/heads/master
c: 3e88c55
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Walker authored and Linus Torvalds committed May 11, 2007
1 parent 56d7247 commit 089b84b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00b8fd236764e3d5bc1d30dc65e256e283de4c3d
refs/heads/master: 3e88c553db938ad016026375f0545304b9030b42
5 changes: 3 additions & 2 deletions trunk/kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/prctl.h>
#include <linux/highuid.h>
#include <linux/fs.h>
#include <linux/resource.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/workqueue.h>
Expand Down Expand Up @@ -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) */
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 089b84b

Please sign in to comment.