KI: add kernel patch for CONFIG_SWAP_HOOK_TASKDATA support 87/156487/4
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 16 Oct 2017 17:56:27 +0000 (20:56 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 20 Oct 2017 09:06:02 +0000 (12:06 +0300)
Change-Id: I6e1c7a65a5231838eb5dfac462cf2192dcb4e39c
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
kernel_integration/patches/0004-SWAP-DA-add-CONFIG_SWAP_HOOK_TASKDATA.patch [new file with mode: 0644]

diff --git a/kernel_integration/patches/0004-SWAP-DA-add-CONFIG_SWAP_HOOK_TASKDATA.patch b/kernel_integration/patches/0004-SWAP-DA-add-CONFIG_SWAP_HOOK_TASKDATA.patch
new file mode 100644 (file)
index 0000000..6beef03
--- /dev/null
@@ -0,0 +1,48 @@
+From 33ffb1ec3846ef532d9d522084fbeaef4945a9e4 Mon Sep 17 00:00:00 2001
+From: Your Name <your@email.com>
+Date: Thu, 5 Oct 2017 09:17:57 +0300
+Subject: [PATCH 4/9] SWAP-DA: add CONFIG_SWAP_HOOK_TASKDATA
+
+---
+ include/swap/hook_taskdata.h | 8 ++++++++
+ kernel/fork.c                | 2 ++
+ 2 files changed, 10 insertions(+)
+ create mode 100644 include/swap/hook_taskdata.h
+
+diff --git a/include/swap/hook_taskdata.h b/include/swap/hook_taskdata.h
+new file mode 100644
+index 0000000..f5346f5
+--- /dev/null
++++ b/include/swap/hook_taskdata.h
+@@ -0,0 +1,8 @@
++#ifndef _LINUX_SWAP_HOOK_TASKDATA_H
++#define _LINUX_SWAP_HOOK_TASKDATA_H
++
++
++static inline void swap_taskdata_put_task(struct task_struct *task) {}
++
++
++#endif /* _LINUX_SWAP_HOOK_TASKDATA_H */
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 1899090..6ee449f 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -59,6 +59,7 @@
+ #include <linux/cn_proc.h>
+ #include <linux/freezer.h>
+ #include <swap/hook_syscall_priv.h>
++#include <swap/hook_taskdata.h>
+ #include <linux/delayacct.h>
+ #include <linux/taskstats_kern.h>
+ #include <linux/random.h>
+@@ -256,6 +257,7 @@ void __put_task_struct(struct task_struct *tsk)
+       WARN_ON(atomic_read(&tsk->usage));
+       WARN_ON(tsk == current);
++      swap_taskdata_put_task(tsk);
+       task_numa_free(tsk);
+       security_task_free(tsk);
+       exit_creds(tsk);
+-- 
+2.1.4
+