lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20111124071716.GA14122@elgon.mountain>
Date:	Thu, 24 Nov 2011 10:17:16 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Jim Keniston <jkenisto@...ibm.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
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@...cle.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ