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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri,  7 Mar 2008 10:07:12 +0100 (CET)
From:	Andi Kleen <andi@...stfloor.org>
To:	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH] [2/13] Make get_order(0) return 0


This is needed for some followup patches. Some old drivers 
(like xd.c) pass 0 to get_order and the compat wrapper for 
the mask allocator doesn't like the resulting underflow.

Signed-off-by: Andi Kleen <ak@...e.de>

---
 include/asm-generic/page.h |    3 +++
 1 file changed, 3 insertions(+)

Index: linux/include/asm-generic/page.h
===================================================================
--- linux.orig/include/asm-generic/page.h
+++ linux/include/asm-generic/page.h
@@ -11,6 +11,9 @@ static __inline__ __attribute_const__ in
 {
 	int order;
 
+	if (size == 0)
+		return 0;
+
 	size = (size - 1) >> (PAGE_SHIFT - 1);
 	order = -1;
 	do {
--
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