Steven Rostedt
6fa46fa526
sched: balance RT task resched only on runqueue
...
Sripathi Kodi reported a crash in the -rt kernel:
https://bugzilla.redhat.com/show_bug.cgi?id=435674
this is due to a place that can reschedule a task without holding
the tasks runqueue lock. This was caused by the RT balancing code
that pulls RT tasks to the current run queue and will reschedule the
current task.
There's a slight chance that the pulling of the RT tasks will release
the current runqueue's lock and retake it (in the double_lock_balance).
During this time that the runqueue is released, the current task can
migrate to another runqueue.
In the prio_changed_rt code, after the pull, if the current task is of
lesser priority than one of the RT tasks pulled, resched_task is called
on the current task. If the current task had migrated in that small
window, resched_task will be called without holding the runqueue lock
for the runqueue that the task is on.
This race condition also exists in the mainline kernel and this patch
adds a check to make sure the task hasn't migrated before calling
resched_task.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Tested-by: Sripathi Kodi <sripathik@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-03-07 16:43:00 +01:00
..
irq
genirq: do not leave interupts enabled on free_irq
2008-02-19 10:43:58 +01:00
power
freezer vs stopped or traced
2008-03-04 07:59:54 -08:00
time
rcu: add support for dynamic ticks and preempt rcu
2008-02-29 18:46:50 +01:00
.gitignore
Update kernel/.gitignore with new auto-generated files
2008-02-09 23:27:01 -08:00
acct.c
audit.c
[PATCH] drop EOE records from printk
2008-03-01 07:16:06 -05:00
audit.h
audit_tree.c
Introduce path_put()
2008-02-14 21:13:33 -08:00
auditfilter.c
Introduce path_put()
2008-02-14 21:13:33 -08:00
auditsc.c
[PATCH] Audit: Fix the format type for size_t variables
2008-03-01 07:16:06 -05:00
backtracetest.c
x86: add a simple backtrace test module
2008-01-30 13:33:08 +01:00
capability.c
Add 64-bit capability support to the kernel
2008-02-05 09:44:20 -08:00
cgroup.c
cgroup: fix default notify_on_release setting
2008-03-04 16:35:09 -08:00
cgroup_debug.c
compat.c
hrtimer: don't modify restart_block->fn in restart functions
2008-02-10 10:48:03 +01:00
configs.c
cpu.c
cpu: fix section mismatch warnings for enable_nonboot_cpus
2008-02-08 09:22:41 -08:00
cpuset.c
cpusets: fix obsolete comment
2008-03-05 17:53:33 -08:00
delayacct.c
dma.c
exec_domain.c
exit.c
exit_notify: fix kill_orphaned_pgrp() usage with mt exit
2008-03-03 14:53:16 -08:00
extable.c
module: Don't report discarded init pages as kernel text.
2008-01-29 17:13:18 +11:00
fork.c
Use struct path in fs_struct
2008-02-14 21:13:33 -08:00
futex.c
futex: runtime enable pi and robust functionality
2008-02-23 17:12:15 -08:00
futex_compat.c
futex: runtime enable pi and robust functionality
2008-02-23 17:12:15 -08:00
hrtimer.c
hrtimer: catch expired CLOCK_REALTIME timers early
2008-02-14 22:08:30 +01:00
itimer.c
ITIMER_REAL: convert to use struct pid
2008-02-08 09:22:29 -08:00
kallsyms.c
remove support for un-needed _extratext section
2008-02-06 10:41:01 -08:00
Kconfig.hz
Kconfig.preempt
kexec.c
vmcoreinfo: add "VMCOREINFO_" to all the call for vmcoreinfo_append_str()
2008-02-07 08:42:25 -08:00
kfifo.c
kmod.c
Dont touch fs_struct in usermodehelper
2008-02-14 21:13:32 -08:00
kprobes.c
kprobes: fix a null pointer bug in register_kretprobe()
2008-03-04 16:35:19 -08:00
ksysfs.c
kthread.c
latencytop.c
lockdep.c
Subject: lockdep: include all lock classes in all_lock_classes
2008-02-25 23:03:02 +01:00
lockdep_internals.h
lockdep_proc.c
Makefile
avoid overflows in kernel/time.c
2008-02-08 09:22:39 -08:00
marker.c
markers: don't risk NULL deref in marker
2008-03-04 16:35:14 -08:00
module.c
module: allow ndiswrapper to use GPL-only symbols
2008-03-04 20:29:40 -08:00
mutex-debug.c
kernel: remove fastcall in kernel/*
2008-02-08 09:22:31 -08:00
mutex-debug.h
mutex.c
kernel: remove fastcall in kernel/*
2008-02-08 09:22:31 -08:00
mutex.h
notifier.c
kernel/notifier.c should #include <linux/reboot.h>
2008-02-06 10:41:02 -08:00
ns_cgroup.c
nsproxy.c
namespaces: move the IPC namespace under IPC_NS option
2008-02-08 09:22:23 -08:00
panic.c
ACPI: Taint kernel on ACPI table override (format corrected)
2008-02-06 22:07:51 -05:00
params.c
Add new string functions strict_strto* and convert kernel params to use them
2008-02-08 09:22:41 -08:00
pid.c
kernel: remove fastcall in kernel/*
2008-02-08 09:22:31 -08:00
pid_namespace.c
namespaces: cleanup the code managed with PID_NS option
2008-02-08 09:22:23 -08:00
pm_qos_params.c
pm qos infrastructure and interface
2008-02-05 09:44:22 -08:00
posix-cpu-timers.c
Use find_task_by_vpid in posix timers
2008-02-08 09:22:41 -08:00
posix-timers.c
hrtimer: check relative timeouts for overflow
2008-02-14 22:08:30 +01:00
printk.c
printk: fix possible printk overrun
2008-02-26 07:42:37 -08:00
profile.c
Nuke a duplicate include from profile.c
2008-02-08 09:22:34 -08:00
ptrace.c
ptrace_check_attach: remove unneeded ->signal != NULL check
2008-02-08 09:22:26 -08:00
rcuclassic.c
rcupdate.c
rcupdate: fix comment
2008-02-13 16:21:18 -08:00
rcupreempt.c
rcupreempt: remove never-migrates assumption from rcu_process_callbacks()
2008-02-29 20:21:13 +01:00
rcupreempt_trace.c
rcutorture.c
relay.c
relay: nopage
2008-02-06 10:41:07 -08:00
res_counter.c
Memory Resource Controller use strstrip while parsing arguments
2008-03-04 16:35:09 -08:00
resource.c
[POWERPC] Add arch-specific walk_memory_remove() for 64-bit powerpc
2008-02-08 19:52:48 +11:00
rtmutex-debug.c
Don't operate with pid_t in rtmutex tester
2008-02-08 09:22:41 -08:00
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
hrtimer: more hrtimer_init_sleeper() fallout.
2008-02-13 15:45:36 +01:00
rtmutex.h
rtmutex_common.h
Don't operate with pid_t in rtmutex tester
2008-02-08 09:22:41 -08:00
rwsem.c
sched.c
sched: retain vruntime
2008-03-07 16:42:59 +01:00
sched_debug.c
sched_fair.c
sched: retain vruntime
2008-03-07 16:42:59 +01:00
sched_idletask.c
sched_rt.c
sched: balance RT task resched only on runqueue
2008-03-07 16:43:00 +01:00
sched_stats.h
seccomp.c
signal.c
freezer vs stopped or traced
2008-03-04 07:59:54 -08:00
softirq.c
rcu: add support for dynamic ticks and preempt rcu
2008-02-29 18:46:50 +01:00
softlockup.c
softlockup: fix task state setting
2008-02-29 18:46:53 +01:00
spinlock.c
spinlock: lockbreak cleanup
2008-01-30 13:31:20 +01:00
srcu.c
make srcu_readers_active() static
2008-02-06 10:41:02 -08:00
stacktrace.c
stop_machine.c
stopmachine: semaphore to mutex
2008-02-06 10:41:08 -08:00
sys.c
Pidns: make full use of xxx_vnr() calls
2008-02-08 09:22:29 -08:00
sys_ni.c
timerfd: new timerfd API
2008-02-05 09:44:07 -08:00
sysctl.c
sched: revert load_balance_monitor() changes
2008-03-04 17:54:06 +01:00
sysctl_check.c
constify tables in kernel/sysctl_check.c
2008-02-08 09:22:31 -08:00
taskstats.c
test_kprobes.c
kprobes: kretprobe user entry-handler
2008-02-06 10:41:11 -08:00
time.c
avoid overflows in kernel/time.c
2008-02-08 09:22:39 -08:00
timeconst.pl
timeconst.pl: correct reversal of USEC_TO_HZ and HZ_TO_USEC
2008-02-12 14:29:26 -08:00
timer.c
kernel: remove fastcall in kernel/*
2008-02-08 09:22:31 -08:00
tsacct.c
uid16.c
user.c
sched: rt-group: make rt groups scheduling configurable
2008-02-13 15:45:40 +01:00
user_namespace.c
namespaces: cleanup the code managed with the USER_NS option
2008-02-08 09:22:23 -08:00
utsname.c
utsname_sysctl.c
wait.c
kernel: remove fastcall in kernel/*
2008-02-08 09:22:31 -08:00
workqueue.c
workqueue: make delayed_work_timer_fn() static
2008-02-08 09:22:37 -08:00