diff options
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r-- | kernel/cpuset.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 77f45ffd5ea1..b602f73fb38d 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/rcupdate.h> | 41 | #include <linux/rcupdate.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/seq_file.h> | 43 | #include <linux/seq_file.h> |
44 | #include <linux/security.h> | ||
44 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
45 | #include <linux/smp_lock.h> | 46 | #include <linux/smp_lock.h> |
46 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
@@ -1177,6 +1178,7 @@ static int attach_task(struct cpuset *cs, char *pidbuf, char **ppathbuf) | |||
1177 | cpumask_t cpus; | 1178 | cpumask_t cpus; |
1178 | nodemask_t from, to; | 1179 | nodemask_t from, to; |
1179 | struct mm_struct *mm; | 1180 | struct mm_struct *mm; |
1181 | int retval; | ||
1180 | 1182 | ||
1181 | if (sscanf(pidbuf, "%d", &pid) != 1) | 1183 | if (sscanf(pidbuf, "%d", &pid) != 1) |
1182 | return -EIO; | 1184 | return -EIO; |
@@ -1205,6 +1207,12 @@ static int attach_task(struct cpuset *cs, char *pidbuf, char **ppathbuf) | |||
1205 | get_task_struct(tsk); | 1207 | get_task_struct(tsk); |
1206 | } | 1208 | } |
1207 | 1209 | ||
1210 | retval = security_task_setscheduler(tsk, 0, NULL); | ||
1211 | if (retval) { | ||
1212 | put_task_struct(tsk); | ||
1213 | return retval; | ||
1214 | } | ||
1215 | |||
1208 | mutex_lock(&callback_mutex); | 1216 | mutex_lock(&callback_mutex); |
1209 | 1217 | ||
1210 | task_lock(tsk); | 1218 | task_lock(tsk); |