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]
Date:	Sun, 3 Jun 2007 13:15:34 -0400
From:	Jeff Dike <jdike@...toit.com>
To:	Zach Brown <zach.brown@...cle.com>, Ingo Molnar <mingo@...e.hu>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	uml-devel <user-mode-linux-devel@...ts.sourceforge.net>
Subject: [PATCH] syslets demo - fix malloc failure check

Fix the stack malloc failure check.

Signed-off-by: Jeff Dike <jdike@...ux.intel.com>
--
 syslets/async-test-v5/sys.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/syslets/async-test-v5/sys.h
===================================================================
--- linux-2.6.orig/syslets/async-test-v5/sys.h	2007-05-31 13:29:57.000000000 -0400
+++ linux-2.6/syslets/async-test-v5/sys.h	2007-06-03 13:12:43.000000000 -0400
@@ -108,9 +108,10 @@ static u64 completion_ring[MAX_PENDING];
 
 static unsigned long thread_stack_alloc()
 {
-	void *stack = malloc(THREAD_STACK_SIZE) + THREAD_STACK_SIZE;
+	void *stack = malloc(THREAD_STACK_SIZE);
 	assert(stack != NULL);
 
+	stack += THREAD_STACK_SIZE;
 	pr("allocated stack: %p\n", stack);
 
 	return (unsigned long)stack;
-
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