summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/mips-mt-fpaff.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-12-10 14:56:44 (GMT)
committerRalf Baechle <ralf@linux-mips.org>2012-12-13 17:15:26 (GMT)
commitb88fb18e7e0e17d517c5267de938c1a35a063a97 (patch)
tree9107e0628da197b43d6aa5f1af911415bc9d2174 /arch/mips/kernel/mips-mt-fpaff.c
parenta685bc3dab27ac359626af4c38bddaf23c22a81f (diff)
downloadlinux-b88fb18e7e0e17d517c5267de938c1a35a063a97.tar.xz
MIPS: MT: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS=y
When CONFIG_UIDGID_STRICT_TYPE_CHECKS is enabled, plain integer checking between different uids/gids is explicitely turned into a build failure by making the k{uid,gid}_t types a structure containing a value: arch/mips/kernel/mips-mt-fpaff.c: In function 'check_same_owner': arch/mips/kernel/mips-mt-fpaff.c:53:22: error: invalid operands to binary == (have 'kuid_t' and 'kuid_t') arch/mips/kernel/mips-mt-fpaff.c:54:15: error: invalid operands to binary == (have 'kuid_t' and 'kuid_t') In order to ensure proper comparison between uids, using the helper function uid_eq() which performs the right thing whenever this config option is turned on or off. Signed-off-by: Florian Fainelli <florian@openwrt.org> Patchwork: https://patchwork.linux-mips.org/patch/4717/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/mips-mt-fpaff.c')
-rw-r--r--arch/mips/kernel/mips-mt-fpaff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
index 33f63ba..fd814e0 100644
--- a/arch/mips/kernel/mips-mt-fpaff.c
+++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -50,8 +50,8 @@ static bool check_same_owner(struct task_struct *p)
rcu_read_lock();
pcred = __task_cred(p);
- match = (cred->euid == pcred->euid ||
- cred->euid == pcred->uid);
+ match = (uid_eq(cred->euid, pcred->euid) ||
+ uid_eq(cred->euid, pcred->uid));
rcu_read_unlock();
return match;
}