Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221828
b: refs/heads/master
c: 1447399
h: refs/heads/master
v: v3
  • Loading branch information
Daniel J Blueman authored and Jens Axboe committed Nov 10, 2010
1 parent e21366d commit 3acf12f
Show file tree
Hide file tree
Showing 2 changed files with 13 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: a014741c0adfb8fb79952939ca087cf03d272bb9
refs/heads/master: 1447399b3e34af016c368b4178db7ef0e04e15b0
14 changes: 12 additions & 2 deletions trunk/fs/ioprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio)
break;

do_each_thread(g, p) {
if (__task_cred(p)->uid != who)
int match;

rcu_read_lock();
match = __task_cred(p)->uid == who;
rcu_read_unlock();
if (!match)
continue;
ret = set_task_ioprio(p, ioprio);
if (ret)
Expand Down Expand Up @@ -232,7 +237,12 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
break;

do_each_thread(g, p) {
if (__task_cred(p)->uid != user->uid)
int match;

rcu_read_lock();
match = __task_cred(p)->uid == user->uid;
rcu_read_unlock();
if (!match)
continue;
tmpio = get_task_ioprio(p);
if (tmpio < 0)
Expand Down

0 comments on commit 3acf12f

Please sign in to comment.