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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1273484765-29055-24-git-send-email-benh@kernel.crashing.org>
Date:	Mon, 10 May 2010 19:46:04 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	linux-mm@...ck.org
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...e.hu,
	davem@...emloft.net, lethal@...ux-sh.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: [PATCH 24/25] lmb: Make lmb_alloc_try_nid() fallback to LMB_ALLOC_ANYWHERE

lmb_alloc_nid() used to fallback to allocating anywhere by using
lmb_alloc() as a fallback.

However, some of my previous patches limit lmb_alloc() to the region
covered by LMB_ALLOC_ACCESSIBLE which is not quite what we want
for lmb_alloc_try_nid().

So we fix it by explicitely using LMB_ALLOC_ANYWHERE.

Not that so far only sparc uses lmb_alloc_nid() and it hasn't been updated
to clamp the accessible zone yet. Thus the temporary "breakage" should have
no effect.

Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
---
 lib/lmb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/lmb.c b/lib/lmb.c
index fd98261..6c38c87 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -531,7 +531,7 @@ phys_addr_t __init lmb_alloc_try_nid(phys_addr_t size, phys_addr_t align, int ni
 
 	if (res)
 		return res;
-	return lmb_alloc(size, align);
+	return lmb_alloc_base(size, align, LMB_ALLOC_ANYWHERE);
 }
 
 
-- 
1.6.3.3

--
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