aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-11-17 01:12:28 -0500
committerEric W. Biederman <ebiederm@xmission.com>2012-11-19 06:05:15 -0500
commitdd34ad35c32bb3d16789d8d4084aead7e68a7b09 (patch)
tree6acf9d527a91cd8320bc017b74f3c782cfc0aedc /arch
parent038e7332b8d4c0629a2965e3ede1a92e8e427bd6 (diff)
userns: On mips modify check_same_owner to use uid_eq
The kbuild test robot <fengguang.wu@intel.com> report the following error when building mips with user namespace support enabled. All error/warnings: 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') Replace "a == b" with uid_eq(a, b) removes this error and allows the code to work with user namespaces enabled. Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch')
-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 33f63bab478a..fd814e08c945 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)
50 50
51 rcu_read_lock(); 51 rcu_read_lock();
52 pcred = __task_cred(p); 52 pcred = __task_cred(p);
53 match = (cred->euid == pcred->euid || 53 match = (uid_eq(cred->euid, pcred->euid) ||
54 cred->euid == pcred->uid); 54 uid_eq(cred->euid, pcred->uid));
55 rcu_read_unlock(); 55 rcu_read_unlock();
56 return match; 56 return match;
57} 57}