diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/compat.c | 2 | ||||
-rw-r--r-- | kernel/rcupreempt.c | 4 | ||||
-rw-r--r-- | kernel/sched.c | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 9c48abfcd4a5..e1ef04870c2a 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -445,7 +445,7 @@ asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid, | |||
445 | if (retval) | 445 | if (retval) |
446 | return retval; | 446 | return retval; |
447 | 447 | ||
448 | return sched_setaffinity(pid, new_mask); | 448 | return sched_setaffinity(pid, &new_mask); |
449 | } | 449 | } |
450 | 450 | ||
451 | asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len, | 451 | asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len, |
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index e9517014b57c..e1cdf196a515 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
@@ -1007,10 +1007,10 @@ void __synchronize_sched(void) | |||
1007 | if (sched_getaffinity(0, &oldmask) < 0) | 1007 | if (sched_getaffinity(0, &oldmask) < 0) |
1008 | oldmask = cpu_possible_map; | 1008 | oldmask = cpu_possible_map; |
1009 | for_each_online_cpu(cpu) { | 1009 | for_each_online_cpu(cpu) { |
1010 | sched_setaffinity(0, cpumask_of_cpu(cpu)); | 1010 | sched_setaffinity(0, &cpumask_of_cpu(cpu)); |
1011 | schedule(); | 1011 | schedule(); |
1012 | } | 1012 | } |
1013 | sched_setaffinity(0, oldmask); | 1013 | sched_setaffinity(0, &oldmask); |
1014 | } | 1014 | } |
1015 | EXPORT_SYMBOL_GPL(__synchronize_sched); | 1015 | EXPORT_SYMBOL_GPL(__synchronize_sched); |
1016 | 1016 | ||
diff --git a/kernel/sched.c b/kernel/sched.c index ccc23a9cd264..1a8252385c4d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4908,9 +4908,10 @@ out_unlock: | |||
4908 | return retval; | 4908 | return retval; |
4909 | } | 4909 | } |
4910 | 4910 | ||
4911 | long sched_setaffinity(pid_t pid, cpumask_t new_mask) | 4911 | long sched_setaffinity(pid_t pid, const cpumask_t *in_mask) |
4912 | { | 4912 | { |
4913 | cpumask_t cpus_allowed; | 4913 | cpumask_t cpus_allowed; |
4914 | cpumask_t new_mask = *in_mask; | ||
4914 | struct task_struct *p; | 4915 | struct task_struct *p; |
4915 | int retval; | 4916 | int retval; |
4916 | 4917 | ||
@@ -4991,7 +4992,7 @@ asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
4991 | if (retval) | 4992 | if (retval) |
4992 | return retval; | 4993 | return retval; |
4993 | 4994 | ||
4994 | return sched_setaffinity(pid, new_mask); | 4995 | return sched_setaffinity(pid, &new_mask); |
4995 | } | 4996 | } |
4996 | 4997 | ||
4997 | /* | 4998 | /* |