taskctx: disable if CONFIG_SWAP_KERNEL_IMMUTABLE 46/144946/1
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 17 Aug 2017 12:24:25 +0000 (15:24 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 18 Aug 2017 11:46:04 +0000 (14:46 +0300)
Change-Id: I5468031320c6ea766986e0fa490cf0600ef04775
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
task_ctx/task_ctx.c

index ed7592f..cfd54f1 100644 (file)
@@ -128,6 +128,9 @@ static struct call_task *call_get(struct task_struct *task)
 
 int taskctx_run(struct task_struct *task, taskctx_t func, void *data)
 {
+       if (IS_ENABLED(CONFIG_SWAP_KERNEL_IMMUTABLE))
+               return -ENOSYS;
+
        if (task == current) {
                func(data);
        } else {