android_kernel_samsung_msm8976/kernel
Yang Yang 26c2046579 futex: Move futex_init() to core_initcall
commit 25f71d1c3e98ef0e52371746220d66458eac75bc upstream.

The UEVENT user mode helper is enabled before the initcalls are executed
and is available when the root filesystem has been mounted.

The user mode helper is triggered by device init calls and the executable
might use the futex syscall.

futex_init() is marked __initcall which maps to device_initcall, but there
is no guarantee that futex_init() is invoked _before_ the first device init
call which triggers the UEVENT user mode helper.

If the user mode helper uses the futex syscall before futex_init() then the
syscall crashes with a NULL pointer dereference because the futex subsystem
has not been initialized yet.

Move futex_init() to core_initcall so futexes are initialized before the
root filesystem is mounted and the usermode helper becomes available.

[ tglx: Rewrote changelog ]

Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
Cc: jiang.biao2@zte.com.cn
Cc: jiang.zhengxiong@zte.com.cn
Cc: zhong.weidong@zte.com.cn
Cc: deng.huali@zte.com.cn
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1483085875-6130-1-git-send-email-yang.yang29@zte.com.cn
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:43:55 +02:00
..
cpu idle: add a check for need_resched() after rcu_idle_enter 2016-10-03 20:28:27 -07:00
debug This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
events perf/core: Fix event inheritance on fork() 2019-07-27 21:43:14 +02:00
gcov
irq This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
locking Import latest Samsung release 2017-04-18 03:43:52 +02:00
power PM / sleep: fix device reference leak in test_suspend 2019-07-27 21:42:48 +02:00
rcu rcu: Don't disable CPU hotplug during OOM notifiers 2016-01-06 23:11:06 -08:00
sched sched/debug: Don't dump sched debug info in SysRq-W 2019-07-27 21:43:52 +02:00
time tick/broadcast: Prevent NULL pointer dereference 2019-07-27 21:43:41 +02:00
trace ring-buffer: Have ring_buffer_iter_empty() return true when empty 2019-07-27 21:43:17 +02:00
.gitignore
Kconfig.freezer
Kconfig.hz
Kconfig.locks Import latest Samsung release 2017-04-18 03:43:52 +02:00
Kconfig.preempt
Makefile UPSTREAM: KEYS: Separate the kernel signature checking keyring from module signing 2016-05-18 14:36:10 +05:30
acct.c
async.c
audit.c audit: Partially remove Samsung changes 2018-02-06 13:12:28 +01:00
audit.h Import latest Samsung release 2017-04-18 03:43:52 +02:00
audit_tree.c
audit_watch.c
auditfilter.c
auditsc.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
backtracetest.c
bounds.c
capability.c
cgroup.c cgroup: prefer %pK to %p 2016-12-06 09:24:09 -08:00
cgroup_freezer.c
compat.c
configs.c
context_tracking.c
cpu.c cpu: send KOBJ_ONLINE event when enabling cpus 2017-07-24 01:09:04 -07:00
cpu_pm.c
cpuset.c cpuset: Make cpusets restore on hotplug 2017-04-18 04:37:17 +02:00
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c ANDROID: exec_domains: Disable request_module() call for personalities 2016-05-18 14:34:40 +05:30
exit.c kernel: Only expose su when daemon is running 2017-05-15 14:43:52 +00:00
extable.c
fork.c kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd 2019-07-27 21:42:45 +02:00
freezer.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
futex.c futex: Move futex_init() to core_initcall 2019-07-27 21:43:55 +02:00
futex_compat.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-02-25 11:57:47 -08:00
groups.c
hrtimer.c time: Remove CONFIG_TIMER_STATS 2017-04-22 23:02:59 +02:00
hung_task.c
irq_work.c irq_work: Remove BUG_ON in irq_work_run() 2016-01-07 00:42:12 -08:00
itimer.c
jump_label.c
kallsyms.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
kcmp.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-02-25 11:57:47 -08:00
kexec.c
kmod.c
kprobes.c
ksysfs.c
kthread.c kthread: Fix the race condition when kthread is parked 2015-06-04 17:43:41 -07:00
latencytop.c
modsign_pubkey.c
module-internal.h UPSTREAM: KEYS: Separate the kernel signature checking keyring from module signing 2016-05-18 14:36:10 +05:30
module.c module: Invalidate signatures on force-loaded modules 2019-07-27 21:42:00 +02:00
module_signing.c UPSTREAM: KEYS: Separate the kernel signature checking keyring from module signing 2016-05-18 14:36:10 +05:30
notifier.c
nsproxy.c
padata.c
panic.c printk: do cond_resched() between lines while outputting to consoles 2019-07-27 21:41:46 +02:00
params.c
pid.c BACKPORT: FROMLIST: pids: make task_tgid_nr_ns() safe 2018-05-26 00:39:33 +02:00
pid_namespace.c
posix-cpu-timers.c
posix-timers.c
printk.c printk: do cond_resched() between lines while outputting to consoles 2019-07-27 21:41:46 +02:00
profile.c
ptrace.c ptrace: fix PTRACE_LISTEN race corrupting task->state 2019-07-27 21:43:16 +02:00
range.c
relay.c
res_counter.c
resource.c This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
seccomp.c UPSTREAM: seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO 2016-05-18 14:36:06 +05:30
signal.c signal: remove warning about using SI_TKILL in rt_[tg]sigqueueinfo 2019-07-27 21:41:45 +02:00
smp.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
smpboot.c smpboot: use kmemleak_not_leak for smpboot_thread_data 2015-05-11 17:07:29 +05:30
smpboot.h
softirq.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
stacktrace.c
stop_machine.c
sys.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
sys_ni.c seccomp: add "seccomp" syscall 2015-03-19 14:52:50 -07:00
sysctl.c sysctl: fix proc_doulongvec_ms_jiffies_minmax() 2019-07-27 21:43:49 +02:00
sysctl_binary.c
system_certificates.S UPSTREAM: KEYS: Separate the kernel signature checking keyring from module signing 2016-05-18 14:36:10 +05:30
system_keyring.c UPSTREAM: KEYS: Separate the kernel signature checking keyring from module signing 2016-05-18 14:36:10 +05:30
task_work.c
taskstats.c
test_kprobes.c
time.c
timeconst.bc
timer.c timers: Use proper base migration in add_timer_on() 2019-07-27 21:42:23 +02:00
tracepoint.c
tsacct.c
uid16.c
up.c
user-return-notifier.c
user.c
user_namespace.c UPSTREAM: capabilities: ambient capabilities 2018-02-06 13:12:16 +01:00
utsname.c
utsname_sysctl.c
watchdog.c
workqueue.c time: Remove CONFIG_TIMER_STATS 2017-04-22 23:02:59 +02:00
workqueue_internal.h