aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhoon Kim <namhoonk@cs.unc.edu>2016-04-19 14:25:35 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2016-04-19 14:25:35 -0400
commitfbd02670f0fef4b1b47585d670a56af33a267399 (patch)
tree793e16a89734ec7b447f6bca9681d5a034d30b5f
parentca0daca0526998799ee9f6aa97f96668981e23f1 (diff)
Add admission check
-rw-r--r--litmus/Kconfig1
-rw-r--r--litmus/litmus.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig
index 81daf35d9432..6e0f77c3bb8f 100644
--- a/litmus/Kconfig
+++ b/litmus/Kconfig
@@ -375,6 +375,7 @@ endmenu
375config PGMRT_SUPPORT 375config PGMRT_SUPPORT
376 bool "Support for PGM^RT API" 376 bool "Support for PGM^RT API"
377 default y 377 default y
378 depends on LITMUS_LOCKING && ALLOW_EARLY_RELEASE
378 help 379 help
379 This option enables support for PGM^RT API. The source code of PGM^RT 380 This option enables support for PGM^RT API. The source code of PGM^RT
380 can be found https://github.com/GElliott/pgm . This option adds some 381 can be found https://github.com/GElliott/pgm . This option adds some
diff --git a/litmus/litmus.c b/litmus/litmus.c
index 702999191203..0f122e1e7ec1 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -168,6 +168,14 @@ asmlinkage long sys_set_rt_task_param(pid_t pid, struct rt_task __user * param)
168 pid, tp.budget_policy); 168 pid, tp.budget_policy);
169 goto out_unlock; 169 goto out_unlock;
170 } 170 }
171#ifdef CONFIG_PGMRT_SUPPORT
172 if (tp.pgm_type < PGM_NOT_A_NODE || tp.pgm_type > PGM_INTERNAL) {
173 printk(KERN_INFO "litmus: real-time task %d rejected "
174 "because of unknown PGM node type specified (%d)\n",
175 pid, tp.pgm_type);
176 goto out_unlock;
177 }
178#endif
171 179
172 target->rt_param.task_params = tp; 180 target->rt_param.task_params = tp;
173 181