LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2/4] make initkmem_list3 non init data to fix modpost warning
@ 2007-01-08  8:11 Vivek Goyal
  2007-01-08 23:00 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Vivek Goyal @ 2007-01-08  8:11 UTC (permalink / raw)
  To: linux kernel mailing list
  Cc: Fastboot mailing list, Morton Andrew Morton, Andi Kleen,
	Eric W. Biederman




o MODPOST generates warning for i386 if kernel is compiled with
  CONFIG_RELOCATABLE=y

WARNING: vmlinux - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0xc01536d9) and 's_start'

o I don't know the code well but looks like this is a bug.  initkmem_list3
  is of type __initdata, and it is accessed by non init functions.

	kmem_cache_create()
		setup_cpu_cache()
			set_up_list3s()
				{
					Accesses initkmem_list3[]
				}

o Somebody who knows this code well needs to review and ack.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---

 mm/slab.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/slab.c~make-initkmem_list3-non-init mm/slab.c
--- linux-2.6.20-rc2-mm1-reloc/mm/slab.c~make-initkmem_list3-non-init	2007-01-04 16:51:02.000000000 +0530
+++ linux-2.6.20-rc2-mm1-reloc-root/mm/slab.c	2007-01-04 16:51:02.000000000 +0530
@@ -305,7 +305,7 @@ struct kmem_list3 {
  * Need this for bootstrapping a per node allocator.
  */
 #define NUM_INIT_LISTS (2 * MAX_NUMNODES + 1)
-struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS];
+struct kmem_list3 initkmem_list3[NUM_INIT_LISTS];
 #define	CACHE_CACHE 0
 #define	SIZE_AC 1
 #define	SIZE_L3 (1 + MAX_NUMNODES)
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/4] make initkmem_list3 non init data to fix modpost warning
  2007-01-08  8:11 [PATCH 2/4] make initkmem_list3 non init data to fix modpost warning Vivek Goyal
@ 2007-01-08 23:00 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2007-01-08 23:00 UTC (permalink / raw)
  To: vgoyal
  Cc: linux kernel mailing list, Fastboot mailing list, Andi Kleen,
	Eric W. Biederman

On Mon, 8 Jan 2007 13:41:04 +0530
Vivek Goyal <vgoyal@in.ibm.com> wrote:

> o Somebody who knows this code well needs to review and ack.

eh.  Moving stuff from __initdata into .data is always safe.  If it
fixes the warning, it's correct ;)

I'll scoot all four of these into 2.6.20, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-08 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-08  8:11 [PATCH 2/4] make initkmem_list3 non init data to fix modpost warning Vivek Goyal
2007-01-08 23:00 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).