aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-09-07 04:19:55 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2013-09-07 05:58:21 -0400
commit2ec7f4aec4d459ef443151ecc875bfbb3a2788f8 (patch)
tree51511f1e1a0b2c18ef8651bc5bcac8f5c5f037ec /arch/s390/kernel
parent7d6c3b492f7fc1b0393b03ec6582a80c3a68bc42 (diff)
s390/compat,uid16: use current_cred()
86a264ab "CRED: Wrap current->cred and a few other accessors" converted all uses of current->cred into current_cred() but left s390 alone. So let's convert s390 finally as well, only five years later. This way we also get rid of a sparse warning which complains about a possible invalid rcu dereference which however is a false positive. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/compat_linux.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 8b6e4f5288a2..1f1b8c70ab97 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -221,25 +221,26 @@ static int groups16_from_user(struct group_info *group_info, u16 __user *groupli
221 221
222asmlinkage long sys32_getgroups16(int gidsetsize, u16 __user *grouplist) 222asmlinkage long sys32_getgroups16(int gidsetsize, u16 __user *grouplist)
223{ 223{
224 const struct cred *cred = current_cred();
224 int i; 225 int i;
225 226
226 if (gidsetsize < 0) 227 if (gidsetsize < 0)
227 return -EINVAL; 228 return -EINVAL;
228 229
229 get_group_info(current->cred->group_info); 230 get_group_info(cred->group_info);
230 i = current->cred->group_info->ngroups; 231 i = cred->group_info->ngroups;
231 if (gidsetsize) { 232 if (gidsetsize) {
232 if (i > gidsetsize) { 233 if (i > gidsetsize) {
233 i = -EINVAL; 234 i = -EINVAL;
234 goto out; 235 goto out;
235 } 236 }
236 if (groups16_to_user(grouplist, current->cred->group_info)) { 237 if (groups16_to_user(grouplist, cred->group_info)) {
237 i = -EFAULT; 238 i = -EFAULT;
238 goto out; 239 goto out;
239 } 240 }
240 } 241 }
241out: 242out:
242 put_group_info(current->cred->group_info); 243 put_group_info(cred->group_info);
243 return i; 244 return i;
244} 245}
245 246