uprobes: add_utask() returns an ERR_PTR() not NULL
PATCH 1/1 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 <[email protected]>
kernel/uprobes.c +3 -1
@@ -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);