]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390: fix kernel oops for CONFIG_MARCH_Z900=y builds
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 25 Nov 2016 08:53:42 +0000 (09:53 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 25 Nov 2016 09:07:55 +0000 (10:07 +0100)
The LAST_BREAK macro in entry.S uses a different instruction sequence
for CONFIG_MARCH_Z900 builds. The branch target offset to skip the
store of the last breaking event address needs to take the different
length of the code block into account.

Fixes: f8fc82b47149e344 ("s390: move sys_call_table and last_break from thread_info to thread_struct")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/entry.S

index 9e0291ad11a7c65c89235808f3fca01b2675a898..161f4e66f67d758b9d083cc0125817641ee4f666 100644 (file)
@@ -123,10 +123,11 @@ _PIF_WORK = (_PIF_PER_TRAP)
 
        .macro  LAST_BREAK scratch
        srag    \scratch,%r10,23
-       jz      .+10
 #ifdef CONFIG_HAVE_MARCH_Z990_FEATURES
+       jz      .+10
        stg     %r10,__TASK_thread+__THREAD_last_break(%r12)
 #else
+       jz      .+14
        lghi    \scratch,__TASK_thread
        stg     %r10,__THREAD_last_break(\scratch,%r12)
 #endif