[patch] uprobes: add_utask() returns an ERR_PTR() not NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to check for IS_ERR() here (add_utask() never returns NULL).

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

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);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux