https://github.com/torvalds/linux
Revision ce96b5ac742801718ae86d2adf0500c5abef3782 authored by Dmitry Adamushko on 15 November 2007, 19:57:40 UTC, committed by Ingo Molnar on 15 November 2007, 19:57:40 UTC
Grant Wilson has reported rare SCHED_FAIR_USER crashes on his quad-core system, which crashes can only be explained via runqueue corruption. there is a narrow SMP race in __set_task_cpu(): after ->cpu is set up to a new value, task_rq_lock(p, ...) can be successfuly executed on another CPU. We must ensure that updates of per-task data have been completed by this moment. this bug has been hiding in the Linux scheduler for an eternity (we never had any explicit barrier for task->cpu in set_task_cpu() - so the bug was introduced in 2.5.1), but only became visible via set_task_cfs_rq() being accidentally put after the task->cpu update. It also probably needs a sufficiently out-of-order CPU to trigger. Reported-by: Grant Wilson <grant.wilson@zen.co.uk> Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent dae51f5
Tip revision: ce96b5ac742801718ae86d2adf0500c5abef3782 authored by Dmitry Adamushko on 15 November 2007, 19:57:40 UTC
sched: fix __set_task_cpu() SMP race
sched: fix __set_task_cpu() SMP race
Tip revision: ce96b5a
File | Mode | Size |
---|---|---|
basic | ||
genksyms | ||
kconfig | ||
ksymoops | ||
mod | ||
package | ||
rt-tester | ||
.gitignore | -rw-r--r-- | 67 bytes |
Kbuild.include | -rw-r--r-- | 8.9 KB |
Lindent | -rwxr-xr-x | 65 bytes |
Makefile | -rw-r--r-- | 893 bytes |
Makefile.build | -rw-r--r-- | 10.5 KB |
Makefile.clean | -rw-r--r-- | 3.2 KB |
Makefile.headersinst | -rw-r--r-- | 6.9 KB |
Makefile.host | -rw-r--r-- | 6.5 KB |
Makefile.lib | -rw-r--r-- | 6.5 KB |
Makefile.modinst | -rw-r--r-- | 1.0 KB |
Makefile.modpost | -rw-r--r-- | 4.4 KB |
bin2c.c | -rw-r--r-- | 702 bytes |
binoffset.c | -rw-r--r-- | 3.9 KB |
bloat-o-meter | -rwxr-xr-x | 1.6 KB |
checkincludes.pl | -rwxr-xr-x | 529 bytes |
checkkconfigsymbols.sh | -rwxr-xr-x | 1.8 KB |
checkpatch.pl | -rwxr-xr-x | 37.7 KB |
checkstack.pl | -rwxr-xr-x | 4.2 KB |
checksyscalls.sh | -rwxr-xr-x | 3.1 KB |
checkversion.pl | -rwxr-xr-x | 1.8 KB |
cleanfile | -rwxr-xr-x | 3.4 KB |
cleanpatch | -rwxr-xr-x | 5.0 KB |
conmakehash.c | -rw-r--r-- | 6.0 KB |
decodecode | -rw-r--r-- | 984 bytes |
export_report.pl | -rw-r--r-- | 4.2 KB |
extract-ikconfig | -rwxr-xr-x | 1.7 KB |
gcc-version.sh | -rw-r--r-- | 816 bytes |
gcc-x86_64-has-stack-protector.sh | -rw-r--r-- | 187 bytes |
gen_initramfs_list.sh | -rw-r--r-- | 6.6 KB |
hdrcheck.sh | -rwxr-xr-x | 281 bytes |
kallsyms.c | -rw-r--r-- | 12.9 KB |
kernel-doc | -rwxr-xr-x | 54.1 KB |
makelst | -rwxr-xr-x | 773 bytes |
mkcompile_h | -rwxr-xr-x | 2.5 KB |
mkmakefile | -rw-r--r-- | 724 bytes |
mksysmap | -rw-r--r-- | 1.3 KB |
mkuboot.sh | -rwxr-xr-x | 379 bytes |
mkversion | -rw-r--r-- | 74 bytes |
namespace.pl | -rwxr-xr-x | 13.1 KB |
patch-kernel | -rwxr-xr-x | 9.7 KB |
pnmtologo.c | -rw-r--r-- | 11.7 KB |
profile2linkerlist.pl | -rw-r--r-- | 378 bytes |
setlocalversion | -rw-r--r-- | 527 bytes |
show_delta | -rwxr-xr-x | 3.0 KB |
unifdef.c | -rw-r--r-- | 29.0 KB |
ver_linux | -rwxr-xr-x | 3.2 KB |
Computing file changes ...