android_kernel_google_msm/kernel
Steve Muckle a0cdd5ba65 sched: fix race between try_to_wake_up() and move_task()
Until a task's state has been seen as interruptible/uninterruptible
and it is no longer on_cpu, it is possible that the task may move
to another CPU (load balancing may cause this). Here is an example
where the race condition results in incorrect operation:

- cpu 0 calls put_prev_task on task A, task A's state is TASK_RUNNING
- cpu 0 runs task B, which attempts to wake up A
- cpu 0 begins try_to_wake_up(), recording src_cpu for task A as cpu 0
- cpu 1 then pulls task A (perhaps due to idle balance)
- cpu 1 runs task A, which then sleeps, becoming INTERRUPTIBLE
- cpu 0 continues in try_to_wake_up(), thinking task A's previous
  cpu is 0, where it is actually 1
- if select_task_rq returns cpu 0, task A will be woken up on cpu 0
  without properly updating its cpu to 0 in set_task_cpu()

CRs-Fixed: 665958
Change-Id: Icee004cb320bd8edfc772d9f74e670a9d4978a99
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2014-07-16 16:34:08 -07:00
..
cpu Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
debug
events Perf: add perf user-mode permissions 2014-07-11 13:42:34 -04:00
gcov
irq Merge "Merge upstream linux-stable v3.10.36 into msm-3.10" 2014-05-05 15:09:00 -07:00
power Power: Changes the permission to read only for sysfs file 2014-06-23 14:39:28 -07:00
sched sched: fix race between try_to_wake_up() and move_task() 2014-07-16 16:34:08 -07:00
time Merge upstream linux-stable v3.10.36 into msm-3.10 2014-04-23 16:23:49 -07:00
trace trace, ring-buffer: Fix CPU hotplug callback registration 2014-07-01 13:51:48 -07:00
.gitignore
acct.c
async.c
audit.c
audit.h
audit_tree.c
audit_watch.c
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
cgroup.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
cgroup_freezer.c
compat.c
configs.c
context_tracking.c
cpu.c CPU hotplug: Provide lockless versions of callback registration functions 2014-07-01 13:42:54 -07:00
cpu_pm.c
cpuset.c cpuset: fix a race condition in __cpuset_node_allowed_softwall() 2014-03-23 21:38:15 -07:00
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c Merge upstream tag 'v3.10.40' into msm-3.10 2014-06-18 13:10:54 -07:00
extable.c
fork.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
freezer.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
futex.c futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1) 2014-07-03 22:10:23 -07:00
futex_compat.c
groups.c
hrtimer.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
hung_task.c
irq_work.c
itimer.c
jump_label.c
kallsyms.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kexec.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latencytop.c
lglock.c
lockdep.c
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
Makefile
modsign_certificate.S
modsign_pubkey.c
module-internal.h
module.c
module_signing.c
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
notifier.c
nsproxy.c
padata.c
panic.c coresight: move call to abort tracing after panic timeout delay 2014-03-07 18:10:19 -08:00
params.c
pid.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
pid_namespace.c pid_namespace: pidns_get() should check task_active_pid_ns() != NULL 2014-04-26 17:15:34 -07:00
posix-cpu-timers.c
posix-timers.c
printk.c ARM: Fix "Make low-level printk work" to use a separate config option 2014-06-13 12:05:51 -07:00
profile.c profile: Fix CPU hotplug callback registration 2014-07-01 13:52:28 -07:00
ptrace.c
range.c
rcu.h
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
seccomp.c
semaphore.c
signal.c
smp.c smp: Allow booting a specific subset of CPUs 2014-05-20 14:56:58 -07:00
smpboot.c
smpboot.h
softirq.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
spinlock.c
srcu.c
stacktrace.c debugging: keep track of page owners 2014-03-28 13:33:08 -07:00
stop_machine.c
sys.c prctl: adds the capable(CAP_SYS_NICE) check to PR_SET_TIMERSLACK_PID. 2014-06-23 15:24:59 -07:00
sys_ni.c
sysctl.c Merge upstream tag 'v3.10.40' into msm-3.10 2014-06-18 13:10:54 -07:00
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
time.c
timeconst.bc
timer.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
tracepoint.c tracing: Do not add event files for modules that fail tracepoints 2014-03-23 21:38:16 -07:00
tsacct.c
uid16.c
up.c
user-return-notifier.c
user.c
user_namespace.c user namespace: fix incorrect memory barriers 2014-04-26 17:15:34 -07:00
utsname.c
utsname_sysctl.c
wait.c
watchdog.c
workqueue.c Merge upstream linux-stable v3.10.36 into msm-3.10 2014-04-23 16:23:49 -07:00
workqueue_internal.h