|
@@ -222,7 +222,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
|
|
|
goto out_unlock; /* No processes for this user */
|
|
|
}
|
|
|
do_each_thread(g, p) {
|
|
|
- if (uid_eq(task_uid(p), uid))
|
|
|
+ if (uid_eq(task_uid(p), uid) && task_pid_vnr(p))
|
|
|
error = set_one_prio(p, niceval, error);
|
|
|
} while_each_thread(g, p);
|
|
|
if (!uid_eq(uid, cred->uid))
|
|
@@ -290,7 +290,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
|
|
|
goto out_unlock; /* No processes for this user */
|
|
|
}
|
|
|
do_each_thread(g, p) {
|
|
|
- if (uid_eq(task_uid(p), uid)) {
|
|
|
+ if (uid_eq(task_uid(p), uid) && task_pid_vnr(p)) {
|
|
|
niceval = nice_to_rlimit(task_nice(p));
|
|
|
if (niceval > retval)
|
|
|
retval = niceval;
|