Skip to contentSkip to conversation

fix TRAP_BAD_SYSCALL_EXITS on i386

PATCH New Andy Whitcroft 1 participant 1 message Jul 2, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix TRAP_BAD_SYSCALL_EXITS on i386

Seems that we are not using the right accessor for the preempt count in entry.S on i386 for the TRAP_BAD_SYSCALL_EXITS checks. Patch below should fix this. Complied and booted on -mm5.

-apw

=== 8<===
We are not using the right offset name, nor the right address when checking for a non-zero preempt count. Move to TI_preempt_count(%ebp).

Revision: $Rev: 356 $

---
 entry.S |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
arch/i386/kernel/entry.S +1 -1
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/i386/kernel/entry.S current/arch/i386/kernel/entry.S
@@ -314,7 +314,7 @@ restore_all:
 	testl $(VM_MASK | 3), %eax
 	jz resume_kernelX		# returning to kernel or vm86-space
 
-	cmpl $0,TI_PRE_COUNT(%ebx)	# non-zero preempt_count ?
+	cmpl $0,TI_preempt_count(%ebp)  # non-zero preempt_count ?
 	jz resume_kernelX
 
         int $3