aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 82975b5b42f7..49d2fa7b687a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4912,7 +4912,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
4912 4912
4913 ret = sched_getaffinity(pid, mask); 4913 ret = sched_getaffinity(pid, mask);
4914 if (ret == 0) { 4914 if (ret == 0) {
4915 int retlen = min(len, cpumask_size()); 4915 size_t retlen = min_t(size_t, len, cpumask_size());
4916 4916
4917 if (copy_to_user(user_mask_ptr, mask, retlen)) 4917 if (copy_to_user(user_mask_ptr, mask, retlen))
4918 ret = -EFAULT; 4918 ret = -EFAULT;