]> git.baikalelectronics.ru Git - kernel.git/commit
x86/traps: Correct exc_general_protection() and math_error() return paths
authorThomas Tai <thomas.tai@oracle.com>
Thu, 8 Apr 2021 17:28:33 +0000 (13:28 -0400)
committerBorislav Petkov <bp@suse.de>
Fri, 9 Apr 2021 11:45:09 +0000 (13:45 +0200)
commitd58873adf3895ff778347c71751b933b81f41011
treeb4581824c67a657e741df1fb5d69378db1249017
parent926eb23c494e4981c3d1c02cada7688a5c1ded48
x86/traps: Correct exc_general_protection() and math_error() return paths

Commit

  d3102639924f ("x86/traps: Attempt to fixup exceptions in vDSO before signaling")

added return statements which bypass calling cond_local_irq_disable().

According to

  d73cd0c2747f ("x86/traps: Make interrupt enable/disable symmetric in C code"),

cond_local_irq_disable() is needed because the asm return code no longer
disables interrupts. Follow the existing code as an example to use "goto
exit" instead of "return" statement.

 [ bp: Massage commit message. ]

Fixes: d3102639924f ("x86/traps: Attempt to fixup exceptions in vDSO before signaling")
Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Link: https://lkml.kernel.org/r/1617902914-83245-1-git-send-email-thomas.tai@oracle.com
arch/x86/kernel/traps.c