On Wed, 10 Oct 2007 18:52:24 -0400
Philippe Rétornaz <[email protected]> wrote:
> As explained on:
> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=53307
> 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.
Just to make it clear: It will disable interrupts in the return
context, so interrupts will be disabled when the interrupt handler
returns.
> 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 <[email protected]>
Nice work. The patch looks correct as far as I can tell, so I think
I'll merge it as soon as possible, and perhaps enable CONFIG_PREEMPT in
the defconfig, to give it some more exposure.
Thanks!
Håvard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[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]