summaryrefslogtreecommitdiffstats
path: root/fs/ioprio.c
diff options
context:
space:
mode:
authorEric W. Biederman2012-03-04 06:17:15 +0100
committerEric W. Biederman2012-05-03 12:29:34 +0200
commit8e96e3b7b8407be794ab1fd8e4b332818a358e78 (patch)
treef27756bb2ec49e586221ac669ea00c68e8a2ee58 /fs/ioprio.c
parentuserns: Convert in_group_p and in_egroup_p to use kgid_t (diff)
downloadkernel-qcow2-linux-8e96e3b7b8407be794ab1fd8e4b332818a358e78.tar.gz
kernel-qcow2-linux-8e96e3b7b8407be794ab1fd8e4b332818a358e78.tar.xz
kernel-qcow2-linux-8e96e3b7b8407be794ab1fd8e4b332818a358e78.zip
userns: Use uid_eq gid_eq helpers when comparing kuids and kgids in the vfs
Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'fs/ioprio.c')
-rw-r--r--fs/ioprio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 2072e41785d2..5e6dbe8958fc 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -37,8 +37,8 @@ int set_task_ioprio(struct task_struct *task, int ioprio)
rcu_read_lock();
tcred = __task_cred(task);
- if (tcred->uid != cred->euid &&
- tcred->uid != cred->uid && !capable(CAP_SYS_NICE)) {
+ if (!uid_eq(tcred->uid, cred->euid) &&
+ !uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) {
rcu_read_unlock();
return -EPERM;
}