summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/head31.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-09-11 10:28:58 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-11 10:29:53 +0200
commit0c88ee5b7523e76e290d558c28cd0be48ffad597 (patch)
treec603735c1012c231a4cc2d315bb30f795e1c4781 /arch/s390/kernel/head31.S
parent[S390] fix recursive locking on page_table_lock (diff)
downloadlinux-0c88ee5b7523e76e290d558c28cd0be48ffad597.tar.xz
linux-0c88ee5b7523e76e290d558c28cd0be48ffad597.zip
[S390] Initialize __LC_THREAD_INFO early.
"lockdep: Fix backtraces" reveales a bug in early setup code: when lockdep tries to save a stack backtrace before setup_arch has been called the lowcore pointer for the current thread info pointer isn't initialized yet. However our save stack backtrace code relies on it. If the pointer isn't initialized the saved backtrace will have zero entries. lockdep however relies (correctly) on the fact that that cannot happen. A write access to some random memory region is the result. Fix this by initializing the thread info pointer early. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/head31.S')
-rw-r--r--arch/s390/kernel/head31.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S
index 2ced846065b7..602b508cd4c4 100644
--- a/arch/s390/kernel/head31.S
+++ b/arch/s390/kernel/head31.S
@@ -24,6 +24,7 @@ startup_continue:
# Setup stack
#
l %r15,.Linittu-.LPG1(%r13)
+ st %r15,__LC_THREAD_INFO # cache thread info in lowcore
mvc __LC_CURRENT(4),__TI_task(%r15)
ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) # init_task_union+THREAD_SIZE
st %r15,__LC_KERNEL_STACK # set end of kernel stack