summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2015-09-24 21:17:04 +0300
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>2015-09-24 21:17:04 +0300
commit87489e87a4abad57558ff3e7ab775dc264348342 (patch)
treef64f61abcc7006ec94eba843df9ef78c4e8f404d
parent20a3b5b04a477cd9b3bba921520e734562012a68 (diff)
downloadswap-modules-87489e87a4abad57558ff3e7ab775dc264348342.tar.gz
swap-modules-87489e87a4abad57558ff3e7ab775dc264348342.tar.bz2
swap-modules-87489e87a4abad57558ff3e7ab775dc264348342.zip
[FIX] check return of set_kjump_cb() for error
Correctly process set_kjump_cb() errors. Change-Id: I8d486e2e62f61cdd94d4aebe0eadaa9a20eabc78 Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
-rw-r--r--us_manager/helper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/us_manager/helper.c b/us_manager/helper.c
index 449a1074..16fd5840 100644
--- a/us_manager/helper.c
+++ b/us_manager/helper.c
@@ -153,8 +153,8 @@ static unsigned long cb_check_and_install(void *data);
static int ctx_task_pre_handler(struct kprobe *p, struct pt_regs *regs)
{
+ int ret;
struct sspt_proc *proc;
- unsigned long page_addr;
struct task_struct *task = current;
if (is_kthread(task) || check_task_on_filters(task) == 0)
@@ -164,9 +164,11 @@ static int ctx_task_pre_handler(struct kprobe *p, struct pt_regs *regs)
if (proc && proc->first_install)
return 0;
- page_addr = 0;
+ ret = set_kjump_cb(regs, cb_check_and_install, NULL, 0);
+ if (ret < 0)
+ pr_err("ctx_task_pre_handler: ret=%d\n", ret);
- return set_kjump_cb(regs, cb_check_and_install, NULL, 0);
+ return 0;
}
static struct kprobe ctx_task_kprobe = {