]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ksplice: correctly clear garbage on signal handling.
authorJamie Iles <jamie.iles@oracle.com>
Thu, 12 Nov 2015 12:29:25 +0000 (12:29 +0000)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 30 Nov 2015 21:43:18 +0000 (13:43 -0800)
The test for _TIF_SIGPENDING was inverted, and so the stack was being
cleared when there were no signals pending rather than signals pending.
Correctly test _TIF_SIGPENDING so that the freezer can be used to clear
the stack of garbage when applying Ksplice updates.

Orabug: 22194459

Reviewed-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S

index 9b0d1bd1d15a43192f281a92985f5e0f6ecec91c..edc8554d1b426742889cb00553d05511db05469a 100644 (file)
@@ -647,7 +647,7 @@ END(work_pending)
 #define STACK_CLEAR_WORDS    0x80
 ENTRY(clear_stack_do_notify_resume)
     testl $_TIF_SIGPENDING, %ecx
-    jnz do_notify_resume
+    jz do_notify_resume
 
     push %eax
     push %ecx
index f9ba92ca936a27ccf95f4d43b2d7a208e15770fc..e72d75f7ababc0e440bda8f061c3a3fc36f9a276 100644 (file)
@@ -1655,7 +1655,7 @@ END(ignore_sysret)
 #define STACK_CLEAR_WORDS    0x80
 ENTRY(clear_stack_do_notify_resume)
     testl $_TIF_SIGPENDING, %edx
-    jnz do_notify_resume
+    jz do_notify_resume
 
     pushq %rdi