lkml.org 
[lkml]   [2011]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] uprobes: add_utask() returns an ERR_PTR() not NULL
We need to check for IS_ERR() here (add_utask() never returns NULL).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/kernel/uprobes.c b/kernel/uprobes.c
index 2493191..3360057 100644
--- a/kernel/uprobes.c
+++ b/kernel/uprobes.c
@@ -1387,8 +1387,10 @@ void uprobe_notify_resume(struct pt_regs *regs)
if (!utask) {
utask = add_utask();
/* Cannot Allocate; re-execute the instruction. */
- if (!utask)
+ if (IS_ERR(utask)) {
+ utask = NULL;
goto cleanup_ret;
+ }
}
utask->active_uprobe = u;
handler_chain(u, regs);

\
 
 \ /
  Last update: 2011-11-24 08:21    [W:0.144 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site