Commit 650f1391 authored by Gabriel Paubert's avatar Gabriel Paubert Committed by Linus Torvalds

[PATCH] 'iret' segment fixup

This fixes the 'iret' exception recovery code to use the new ES/DS segment
rules - load them with __USER_DS instead of __KERNEL_DS.

It also fixes a typo in a comment.
parent f63dc6c8
...@@ -126,10 +126,9 @@ VM_MASK = 0x00020000 ...@@ -126,10 +126,9 @@ VM_MASK = 0x00020000
addl $4, %esp; \ addl $4, %esp; \
1: iret; \ 1: iret; \
.section .fixup,"ax"; \ .section .fixup,"ax"; \
2: pushl %ss; \ 2: movl $(__USER_DS), %edx; \
popl %ds; \ movl %edx, %ds; \
pushl %ss; \ movl %edx, %es; \
popl %es; \
pushl $11; \ pushl $11; \
call do_exit; \ call do_exit; \
.previous; \ .previous; \
...@@ -225,7 +224,7 @@ need_resched: ...@@ -225,7 +224,7 @@ need_resched:
movl TI_FLAGS(%ebp), %ecx # need_resched set ? movl TI_FLAGS(%ebp), %ecx # need_resched set ?
testb $_TIF_NEED_RESCHED, %cl testb $_TIF_NEED_RESCHED, %cl
jz restore_all jz restore_all
testl $IF_MASK,EFLAGS(%esp) # interrupts off (execption path) ? testl $IF_MASK,EFLAGS(%esp) # interrupts off (exception path) ?
jz restore_all jz restore_all
movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebp) movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebp)
sti sti
......
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