https://github.com/torvalds/linux
Revision 516949480d3700cbde4272228a102c84721d6007 authored by Paolo 'Blaisorblade' Giarrusso on 29 December 2005, 16:39:51 UTC, committed by Linus Torvalds on 29 December 2005, 17:48:15 UTC
Don't use printk() where "current_thread_info()" is crap.

Until when we switch to running on init_stack, current_thread_info() evaluates
to crap. Printk uses "current" at times (in detail, &current is evaluated with
CONFIG_DEBUG_SPINLOCK to check the spinlock owner task).

And this leads to random segmentation faults.

Exactly, what happens is that &current = *(current_thread_info()), i.e. round
down $esp and dereference the value. I.e. access the stack below $esp, which
causes SIGSEGV on a VM_GROWSDOWN vma (see arch/i386/mm/fault.c).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 3603bc8
History
Tip revision: 516949480d3700cbde4272228a102c84721d6007 authored by Paolo 'Blaisorblade' Giarrusso on 29 December 2005, 16:39:51 UTC
[PATCH] uml: fix random segfaults at bootup
Tip revision: 5169494
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 391 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 63.8 KB
Makefile -rw-r--r-- 42.8 KB
README -rw-r--r-- 14.7 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top