1
0
Fork 0
alistair23-linux/arch/avr32
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
..
boards [AVR32] ngw100 i2c-gpio tweaks 2007-10-11 13:32:55 +02:00
boot [PATCH] AVR32: Minor Makefile cleanup 2006-10-25 20:26:32 -07:00
configs leds: leds-gpio for ngw100 2007-07-16 01:15:51 +01:00
kernel [AVR32] Fix random segfault with preemption 2007-10-11 13:32:56 +02:00
lib [AVR32] Remove last remains of libgcc 2007-02-09 15:01:59 +01:00
mach-at32ap [AVR32] SMC configuration in clock cycles 2007-10-11 13:32:49 +02:00
mm [AVR32] Drop support for redundant "keepinitrd" boot-time parm. 2007-10-11 12:16:57 +02:00
Kconfig [AVR32] Make STK1000 mux settings configurable 2007-07-18 20:45:51 +02:00
Kconfig.debug [PATCH] avr32 architecture 2006-09-26 08:48:54 -07:00
Makefile [AVR32] Use correct config symbol when setting cpuflags 2007-05-09 08:48:38 +02:00