android_kernel_xiaomi_sm7250/kernel
Linus Torvalds 10b1fbdb0a Make sure "user->sigpending" count is in sync
The previous commit (45c18b0bb5, aka "Fix
unlikely (but possible) race condition on task->user access") fixed a
potential oops due to __sigqueue_alloc() getting its "user" pointer out
of sync with switch_user(), and accessing a user pointer that had been
de-allocated on another CPU.

It still left another (much less serious) problem, where a concurrent
__sigqueue_alloc and swich_user could cause sigqueue_alloc to do signal
pending reference counting for a _different_ user than the one it then
actually ended up using.  No oops, but we'd end up with the wrong signal
accounting.

Another case of Oleg's eagle-eyes picking up the problem.

This is trivially fixed by just making sure we load whichever "user"
structure we decide to use (it doesn't matter _which_ one we pick, we
just need to pick one) just once.

Acked-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-04 13:03:00 -08:00
..
irq
power [PATCH] swsusp: debugging 2006-11-03 12:27:58 -08:00
time
.gitignore
acct.c
audit.c
audit.h
auditfilter.c
auditsc.c
capability.c
compat.c [PATCH] Create compat_sys_migrate_pages 2006-11-03 12:27:59 -08:00
configs.c
cpu.c
cpuset.c
delayacct.c
dma.c
exec_domain.c
exit.c
extable.c
fork.c
futex_compat.c
futex.c
hrtimer.c
itimer.c
kallsyms.c
Kconfig.hz
Kconfig.preempt
kexec.c
kfifo.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latency.c
lockdep_internals.h
lockdep_proc.c
lockdep.c
Makefile
module.c
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
nsproxy.c
panic.c
params.c
pid.c
posix-cpu-timers.c
posix-timers.c
printk.c
profile.c
ptrace.c
rcupdate.c
rcutorture.c
relay.c
resource.c
rtmutex_common.h
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rwsem.c
sched.c
seccomp.c
signal.c Make sure "user->sigpending" count is in sync 2006-11-04 13:03:00 -08:00
softirq.c
softlockup.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c
sys_ni.c [PATCH] Create compat_sys_migrate_pages 2006-11-03 12:27:59 -08:00
sys.c
sysctl.c
taskstats.c
time.c
timer.c
tsacct.c
uid16.c
unwind.c
user.c Fix unlikely (but possible) race condition on task->user access 2006-11-04 10:06:02 -08:00
utsname.c
wait.c
workqueue.c