Re: Thanks for 8b5ede69d24d

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

 



On Mon, 2013-10-07 at 21:37 -0700, Hugh Dickins wrote:
> Phew, I was gearing up to sending you a report on how Frederic's
> "low-risk" irq stack patch had broken booting -rc4 on the G5 Quad;
> but noticed this just gone in, gave it a try, it fixes it.
> 
> (I see Frederic's ded797547548 is marked for stable,
> perhaps you'll have to chase that one with this.)

Good point, this should go into stable at the same time. Thanks !

Stable folks, the commit below
(8b5ede69d24db939f52b47effff2f6fe1e83e08b) is in Linus tree and should
hit the same stable trees as Fred's ded797547548 if possible. Thanks !

Cheers,
Ben.

> Hugh
> 
> commit 8b5ede69d24db939f52b47effff2f6fe1e83e08b
> Author: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Date:   Tue Oct 8 08:08:24 2013 +1100
> 
>     powerpc/irq: Don't switch to irq stack from softirq stack
>     
>     irq_exit() is now called on the irq stack, which can trigger a switch to
>     the softirq stack from the irq stack.  If an interrupt happens at that
>     point, we will not properly detect the re-entrancy and clobber the
>     original return context on the irq stack.
>     
>     This fixes it.  The side effect is to prevent all nesting from softirq
>     stack to irq stack even in the "safe" case but it's simpler that way and
>     matches what x86_64 does.
>     
>     Reported-by: Cedric Le Goater <clg@xxxxxxxxxx>
>     Tested-by: Cedric Le Goater <clg@xxxxxxxxxx>
>     Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
>     Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> 
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 57d286a..c7cb8c2 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -495,14 +495,15 @@ void __do_irq(struct pt_regs *regs)
>  void do_IRQ(struct pt_regs *regs)
>  {
>         struct pt_regs *old_regs = set_irq_regs(regs);
> -       struct thread_info *curtp, *irqtp;
> +       struct thread_info *curtp, *irqtp, *sirqtp;
>  
>         /* Switch to the irq stack to handle this */
>         curtp = current_thread_info();
>         irqtp = hardirq_ctx[raw_smp_processor_id()];
> +       sirqtp = softirq_ctx[raw_smp_processor_id()];
>  
>         /* Already there ? */
> -       if (unlikely(curtp == irqtp)) {
> +       if (unlikely(curtp == irqtp || curtp == sirqtp)) {
>                 __do_irq(regs);
>                 set_irq_regs(old_regs);
>                 return;


--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]