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 cgroups: add per-thread subsystem callbacks
compat.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
configs.c llseek: automatically add .llseek fop
cpu.c Fix common misspellings
cpuset.c cpuset: Fix cpuset_cpus_allowed_fallback(), don't update tsk->rt.nr_cpus_allowed
crash_dump.c crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn
cred.c Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs
delayacct.c headers: taskstats_kern.h trim
dma.c kernel/dma.c: remove a CVS keyword
elfcore.c elf coredump: add extended numbering support
exec_domain.c sys_personality: remove the bogus checks in sys_personality()->__set_personality() path
exit.c Merge branch 'ptrace' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc
extable.c extable, core_kernel_data(): Make sure all archs define _sdata
fork.c mm: Fix boot crash in mm_alloc()
freezer.c Freezer: Use SMP barriers
futex.c futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup
futex_compat.c userns: user namespaces: convert several capable() calls
groups.c userns: user namespaces: convert several capable() calls
hrtimer.c hrtimers: Fix typo causing erratic timers
hung_task.c watchdog, hung_task_timeout: Add Kconfig configurable default
irq_work.c irq_work: Use per cpu atomics instead of regular atomics
itimer.c itimers: Fix racy writes to cpu_itimer fields
jump_label.c jump_label: Check entries limit in __jump_label_update
kallsyms.c Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
kexec.c PM: Remove sysdev suspend, resume and shutdown operations
kfifo.c kfifo: fix scatterlist usage
kmod.c Merge branch 'next' into for-linus
kprobes.c Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
ksysfs.c kernel/ksysfs.c: expose file_caps_enabled in sysfs
kthread.c cpuset: Fix cpuset_cpus_allowed_fallback(), don't update tsk->rt.nr_cpus_allowed
latencytop.c Fix common misspellings
lockdep.c lockdep: Remove cmpxchg to update nr_chain_hlocks
lockdep_internals.h lockdep: No need to disable preemption in debug atomic ops
lockdep_proc.c lockdep: Remove unused 'factor' variable from lockdep_stats_show()
lockdep_states.h lockdep: move state bit definitions around
module.c Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
mutex-debug.c mutex: Use p->on_cpu for the adaptive spin
mutex-debug.h mutex: Use p->on_cpu for the adaptive spin
mutex.c lockdep, mutex: provide mutex_lock_nest_lock
mutex.h mutex: Use p->on_cpu for the adaptive spin
notifier.c sched: Use lockdep-based checking on rcu_dereference()
nsproxy.c cgroup: remove the ns_cgroup
padata.c Fix common misspellings
panic.c move x86 specific oops=panic to generic code
params.c params.c: Use new strtobool function to process boolean inputs
pid.c next_pidmap: fix overflow condition
pid_namespace.c pidns: call pid_ns_prepare_proc() from create_pid_namespace()
pm_qos_params.c Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6
posix-cpu-timers.c hrtimers: Avoid touching inactive timer bases
posix-timers.c posix-timers: RCU conversion
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