linux-stable-rt/arch/avr32/kernel
Philippe Rétornaz a7e30b8d91 [AVR32] Fix random segfault with preemption
As explained on:
http://www.avrfreaks.net/index.php?nameÿphpBB2&fileÿewtopic&tS307
If the current process is preempted before it can copy RAR_SUP and
RSR_SUP both register are lost and the process will segfault as soon
as it return from the syscall since the return adress will be
corrupted.

This patch disable IRQ as soon as we enter the syscall path and
reenable them when the copy is done.

In the interrupt handlers, check if we are interrupting the srrf
instruction, if so disable interrupts and return. The interrupt
handler will be re-called immediatly when the interrupts are
reenabled.

After some stressing workload:
 - find / > /dev/null in loop
 - top (in ssh)
 - ping -f avr32

The segfaults are not seen anymore.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11 13:32:56 +02:00
..
Makefile [AVR32] rename vmlinux.lds 2007-10-11 12:16:56 +02:00
asm-offsets.c
avr32_ksyms.c
cpu.c
entry-avr32b.S [AVR32] Fix random segfault with preemption 2007-10-11 13:32:56 +02:00
head.S
init_task.c
irq.c
kprobes.c
module.c
process.c
ptrace.c PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
semaphore.c
setup.c [AVR32] fix command line parsing in early_parse_fbmem 2007-10-11 12:16:56 +02:00
signal.c
switch_to.S
sys_avr32.c
syscall-stubs.S
syscall_table.S
time.c
traps.c
vmlinux.lds.S [AVR32] Remove unneeded 8K alignment of .text section 2007-10-11 12:16:57 +02:00