[PATCH] Fix preemption off of irq context on x86-64 with PREEMPT_BKL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> x86_64-fix-config_preempt.patch
>   x86_64: Fix CONFIG_PREEMPT

This patch causes another bug to show up some lines below with
CONFIG_PREEMPT_BKL. schedule releases the BKL which it shouldn't do.

Call preempt_schedule_irq instead (like for i386). This seems to fix the
easily reproducible filesystem errors I've seen (with reiserfs, which
heavily relies on the BKL).

Signed-off-by: Christophe Saout <[email protected]>

--- linux-2.6.12-rc1-mm2.orig/arch/x86_64/kernel/entry.S	2005-03-24 17:32:22.000000000 +0100
+++ linux-2.6.12-rc1-mm2/arch/x86_64/kernel/entry.S	2005-03-26 23:40:30.000000000 +0100
@@ -517,12 +517,7 @@
 	jnc  retint_restore_args
 	bt   $9,EFLAGS-ARGOFFSET(%rsp)	/* interrupts off? */
 	jnc  retint_restore_args
-	movl $PREEMPT_ACTIVE,threadinfo_preempt_count(%rcx)
-	sti
-	call schedule
-	cli
-	GET_THREAD_INFO(%rcx)
-	movl $0,threadinfo_preempt_count(%rcx) 
+	call preempt_schedule_irq
 	jmp exit_intr
 #endif	
 	CFI_ENDPROC

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux