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]
Date:	Thu, 28 May 2009 16:29:25 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	mingo@...e.hu
Cc:	cl@...ux-foundation.com, torvals@...ux-foundation.org,
	mpm@...enic.com, npiggin@...e.de, yinghai@...nel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] init: call vfs_caches_init_early() later in the boot
 sequence

From: Pekka Enberg <penberg@...helsinki.fi>

There's no need to call vfs_caches_init_early() before kmem_cache_init(). All
we have to do is make sure we don't attempt to use the bootmem allocator after
we've called mem_init().

Cc: Christoph Lameter <cl@...ux-foundation.com>
Cc: Linus Torvalds <torvals@...ux-foundation.org>
Cc: Matt Mackall <mpm@...enic.com>
Cc: Nick Piggin <npiggin@...e.de>
Cc: Yinghai Lu <yinghai@...nel.org>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
 fs/dcache.c |    2 +-
 fs/inode.c  |    2 +-
 init/main.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index ee60ce4..6c48ba1 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2255,7 +2255,7 @@ static void __init dcache_init_early(void)
 					sizeof(struct hlist_head),
 					dhash_entries,
 					13,
-					HASH_EARLY,
+					0,
 					&d_hash_shift,
 					&d_hash_mask,
 					0);
diff --git a/fs/inode.c b/fs/inode.c
index 0571983..92379c8 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1487,7 +1487,7 @@ void __init inode_init_early(void)
 					sizeof(struct hlist_head),
 					ihash_entries,
 					14,
-					HASH_EARLY,
+					0,
 					&i_hash_shift,
 					&i_hash_mask,
 					0);
diff --git a/init/main.c b/init/main.c
index 5a19578..f6bd51f 100644
--- a/init/main.c
+++ b/init/main.c
@@ -588,7 +588,6 @@ asmlinkage void __init start_kernel(void)
 	 * kmem_cache_init()
 	 */
 	pidhash_init();
-	vfs_caches_init_early();
 	/*
 	 * Set up kernel memory allocators
 	 */
@@ -658,6 +657,7 @@ asmlinkage void __init start_kernel(void)
 		initrd_start = 0;
 	}
 #endif
+	vfs_caches_init_early();
 	cpuset_init_early();
 	page_cgroup_init();
 	enable_debug_pagealloc();
-- 
1.6.0.4



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