An error occurred while fetching folder content.
mm: Fix boot crash in mm_alloc()
Linus Torvalds authored
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 de03c72c

 ("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: default avatarThomas Gleixner <tglx@linutronix.de>
Reported-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
6345d24d
Name Last commit Last update
..
debug Fix common misspellings
events perf: Fix SIGIO handling
gcov Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
irq irq: Remove smp_affinity_list when unregister irq proc
power PM / Hibernate: Update kerneldoc comments in hibernate.c
time hrtimers: Avoid touching inactive timer bases
trace ftrace: Add internal recursive checks
.gitignore Update kernel/.gitignore with new auto-generated files
Kconfig.freezer container freezer: implement freezer cgroup subsystem
Kconfig.hz sched: fix SCHED_HRTICK dependency
Kconfig.locks arch:Kconfig.locks Remove unused config option.
Kconfig.preempt rcu: provide RCU options on non-preempt architectures too
Makefile cgroup: remove the ns_cgroup
acct.c pass a struct path to vfs_statfs
async.c async: use workqueue for worker pool
audit.c netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms
audit.h audit: make functions static
audit_tree.c Fix common misspellings
audit_watch.c kill path_lookup()
auditfilter.c netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms
auditsc.c audit: acquire creds selectively to reduce atomic op overhead
backtracetest.c backtrace: replace timer with tasklet + completions
bounds.c memcg: remove direct page_cgroup-to-page pointer
capability.c Merge branch 'master' into next
cgroup.c cgroup: remove the ns_cgroup
cgroup_freezer.c
compat.c
configs.c
cpu.c
cpuset.c
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c
extable.c
fork.c
freezer.c
futex.c
futex_compat.c
groups.c
hrtimer.c
hung_task.c
irq_work.c
itimer.c
jump_label.c
kallsyms.c
kexec.c
kfifo.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latencytop.c
lockdep.c
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
module.c
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
notifier.c
nsproxy.c
padata.c
panic.c
params.c
pid.c
pid_namespace.c
pm_qos_params.c
posix-cpu-timers.c
posix-timers.c
printk.c
profile.c
ptrace.c
range.c
rcupdate.c
rcutiny.c
rcutiny_plugin.h
rcutorture.c
rcutree.c
rcutree.h
rcutree_plugin.h
rcutree_trace.c
relay.c
res_counter.c
resource.c
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
sched.c
sched_autogroup.c
sched_autogroup.h