public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* Double free of initramfs
@ 2005-03-16 18:49 Ralf Baechle
  2005-03-22  2:21 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2005-03-16 18:49 UTC (permalink / raw)
  To: linux-arch

In all linker scripts we currently have something like this:

  __init_begin = .;
 ...
   . = ALIGN(4096);
  __initramfs_start = .;
  .init.ramfs : { *(.init.ramfs) }
  __initramfs_end = .;
  ...
  __init_end = .;

It seems all 25 linker scripts in the current bk tree are suffering from
this.  Which mean with CONFIG_BLK_DEV_INITRD enabled first free_initrd_mem
may be called to free the initram disk and just a little later
free_initmem will try to free the entire range again, so either the
linker scripts would need fixing or free_initrd_mem has become obsolete.

  Ralf

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: Double free of initramfs
@ 2005-03-22 23:07 Luck, Tony
  0 siblings, 0 replies; 7+ messages in thread
From: Luck, Tony @ 2005-03-22 23:07 UTC (permalink / raw)
  To: Sam Ravnborg, Ralf Baechle; +Cc: Andrew Morton, linux-arch, Adrian Bunk

>+
>+/* initramfs area. */
>+# define INITRAMFS		\
>+	. = ALIGN(4096);		\
>+	.init.ramfs : {						

Why the 4096 alignment?  If you need it page aligned (and I can't
see why you would), then bear in mind that not all architectures
use a 4k pagesize.

-Tony

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

end of thread, other threads:[~2005-03-22 23:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-16 18:49 Double free of initramfs Ralf Baechle
2005-03-22  2:21 ` Andrew Morton
2005-03-22 22:10   ` Adrian Bunk
2005-03-22 22:41   ` Ralf Baechle
2005-03-22 22:57     ` Sam Ravnborg
2005-03-22 23:24       ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2005-03-22 23:07 Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox