linux-stable/init
Linus Torvalds 6345d24daf mm: Fix boot crash in mm_alloc()
Thomas Gleixner reports that we now have a boot crash triggered by
CONFIG_CPUMASK_OFFSTACK=y:

    BUG: unable to handle kernel NULL pointer dereference at   (null)
    IP: [<c11ae035>] find_next_bit+0x55/0xb0
    Call Trace:
     [<c11addda>] cpumask_any_but+0x2a/0x70
     [<c102396b>] flush_tlb_mm+0x2b/0x80
     [<c1022705>] pud_populate+0x35/0x50
     [<c10227ba>] pgd_alloc+0x9a/0xf0
     [<c103a3fc>] mm_init+0xec/0x120
     [<c103a7a3>] mm_alloc+0x53/0xd0

which was introduced by commit de03c72cfc ("mm: convert
mm->cpu_vm_cpumask into cpumask_var_t"), and is due to wrong ordering of
mm_init() vs mm_init_cpumask

Thomas wrote a patch to just fix the ordering of initialization, but I
hate the new double allocation in the fork path, so I ended up instead
doing some more radical surgery to clean it all up.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-29 11:32:28 -07:00
..
calibrate.c init/calibrate.c: fix for critical bogoMIPS intermittent calculation failure 2011-05-25 08:39:46 -07:00
do_mounts.c Fix common misspellings 2011-03-31 11:26:23 -03:00
do_mounts.h md: move lots of #include lines out of .h files and into .c 2009-03-31 14:33:13 +11:00
do_mounts_initrd.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
do_mounts_md.c init: mark __user address space on string literals 2010-10-26 16:52:15 -07:00
do_mounts_rd.c init: return proper error code in do_mounts_rd() 2011-03-22 17:44:15 -07:00
initramfs.c Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-10-28 15:13:55 -07:00
Kconfig cgroup: remove the ns_cgroup 2011-05-26 17:12:34 -07:00
main.c mm: Fix boot crash in mm_alloc() 2011-05-29 11:32:28 -07:00
Makefile kbuild: move compile.h to include/generated 2009-12-12 13:08:14 +01:00
noinitramfs.c init: mark __user address space on string literals 2010-10-26 16:52:15 -07:00
version.c userns: add a user_namespace as creator/owner of uts_namespace 2011-03-23 19:46:59 -07:00