From dc36011011ad1a2ad7538993046276db63fa1b84 Mon Sep 17 00:00:00 2001 From: David Quigley Date: Wed, 28 Jun 2006 09:36:46 -0400 Subject: [PATCH] --- yaml --- r: 46129 b: refs/heads/master c: 7418cb89af6f9e21660d60a4bd088a8b6fd11e81 h: refs/heads/master i: 46127: 90300ee5e538243911d6c6c3cf7c534bc3289509 v: v3 --- [refs] | 2 +- trunk/arch/mips/kernel/mips-mt.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a75f28677647..7a37fb0b4117 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c9170617510059c750cb91207b08f35001571a22 +refs/heads/master: 7418cb89af6f9e21660d60a4bd088a8b6fd11e81 diff --git a/trunk/arch/mips/kernel/mips-mt.c b/trunk/arch/mips/kernel/mips-mt.c index c1373a6e668b..a32f6797353a 100644 --- a/trunk/arch/mips/kernel/mips-mt.c +++ b/trunk/arch/mips/kernel/mips-mt.c @@ -96,6 +96,10 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, goto out_unlock; } + retval = security_task_setscheduler(p, 0, NULL); + if (retval) + goto out_unlock; + /* Record new user-specified CPU set for future reference */ p->thread.user_cpus_allowed = new_mask; @@ -141,8 +145,9 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, p = find_process_by_pid(pid); if (!p) goto out_unlock; - - retval = 0; + retval = security_task_getscheduler(p); + if (retval) + goto out_unlock; cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);