X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fsys.c;h=877fe4f8e05e0439e58edae684bf6a57c6e9e3a9;hb=16985408b5c48585762ec3b9b7bae1dec4ad7437;hp=26a6b73a6b85bbc2a4ee1e1392d3aa86d1e9a850;hpb=35858adbfca13678af99fb31618ef4428d6dedb0;p=pandora-kernel.git diff --git a/kernel/sys.c b/kernel/sys.c index 26a6b73a6b85..877fe4f8e05e 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -222,6 +222,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who) if (which > PRIO_USER || which < PRIO_PROCESS) return -EINVAL; + rcu_read_lock(); read_lock(&tasklist_lock); switch (which) { case PRIO_PROCESS: @@ -267,6 +268,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who) } out_unlock: read_unlock(&tasklist_lock); + rcu_read_unlock(); return retval; } @@ -569,11 +571,6 @@ static int set_user(struct cred *new) if (!new_user) return -EAGAIN; - if (!task_can_switch_user(new_user, current)) { - free_uid(new_user); - return -EINVAL; - } - if (atomic_read(&new_user->processes) >= current->signal->rlim[RLIMIT_NPROC].rlim_cur && new_user != INIT_USER) {