diff options
author | Christopher Kenna <cjk@cs.unc.edu> | 2011-04-16 20:12:00 -0400 |
---|---|---|
committer | Christopher Kenna <cjk@cs.unc.edu> | 2011-04-20 23:58:06 -0400 |
commit | 7d754596756240fa918b94cd0c3011c77a638987 (patch) | |
tree | dbf8b7adfc0963b0152a7a9348ca8a89943b9667 /litmus | |
parent | 6d4cc883ec2470500be6c95fd2e7c6944e89c3e8 (diff) |
LITMUS Core: Check for valid class in RT-param syscall.
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/litmus.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index 11ccaafd50de..26938acacafc 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -110,6 +110,14 @@ asmlinkage long sys_set_rt_task_param(pid_t pid, struct rt_task __user * param) | |||
110 | "because wcet > period\n", pid); | 110 | "because wcet > period\n", pid); |
111 | goto out_unlock; | 111 | goto out_unlock; |
112 | } | 112 | } |
113 | if ( tp.cls != RT_CLASS_HARD && | ||
114 | tp.cls != RT_CLASS_SOFT && | ||
115 | tp.cls != RT_CLASS_BEST_EFFORT) | ||
116 | { | ||
117 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
118 | "because its class is invalid\n"); | ||
119 | goto out_unlock; | ||
120 | } | ||
113 | if (tp.budget_policy != NO_ENFORCEMENT && | 121 | if (tp.budget_policy != NO_ENFORCEMENT && |
114 | tp.budget_policy != QUANTUM_ENFORCEMENT && | 122 | tp.budget_policy != QUANTUM_ENFORCEMENT && |
115 | tp.budget_policy != PRECISE_ENFORCEMENT) | 123 | tp.budget_policy != PRECISE_ENFORCEMENT) |