Commit 2391c4b5 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Don't call do_exit with interrupts disabled after IRET exception

This caused a sigreturn with bad argument on a preemptible kernel
to complain with

Debug: sleeping function called from invalid context at /home/lsrc/quilt/linux/include/linux/rwsem.h:43
in_atomic():0, irqs_disabled():1

Call Trace: {__might_sleep+190} {profile_task_exit+21}
       {__do_exit+34} {do_wait+0}
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a62eaf15
...@@ -554,6 +554,7 @@ iret_label: ...@@ -554,6 +554,7 @@ iret_label:
/* running with kernel gs */ /* running with kernel gs */
bad_iret: bad_iret:
movq $-9999,%rdi /* better code? */ movq $-9999,%rdi /* better code? */
sti
jmp do_exit jmp do_exit
.previous .previous
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment