From: Jan Kiszka <[email protected]>

This caused subtle system corruptions on SMP: The context which took the
IRQ may migrate to a different CPU during the execution of the IRQ
handler (migration to root domain -> load balancing). So we must refresh
the per-CPU domain data and not use the one obtained on entry.

Signed-off-by: Jan Kiszka <[email protected]>
---

Just for early review. I'll send 2.6.38 pull requests for these
patches, some more fixes, and access optimizations for
ipipe_percpu_domain_data::status next week after running more serious
SMP load against them.

Note that this bug affects any ipipe version I've found in git. So the
patch should be applied/backported to all versions we still support.

PS: Months of collecting oopses, more than 1 weeks of debugging.
Yeah, there were more bugs, but this was likely the toughest monster.

 kernel/ipipe/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/ipipe/core.c b/kernel/ipipe/core.c
index 9aa4800..0ed7751 100644
--- a/kernel/ipipe/core.c
+++ b/kernel/ipipe/core.c
@@ -1168,6 +1168,7 @@ void __ipipe_dispatch_wired_nocheck(struct ipipe_domain 
*head, unsigned irq) /*
        head->irqs[irq].handler(irq, head->irqs[irq].cookie); /* Call the ISR. 
*/
        __ipipe_run_irqtail(irq);
        barrier();
+       p = ipipe_cpudom_ptr(head);
        __clear_bit(IPIPE_STALL_FLAG, &p->status);
 
        if (__ipipe_current_domain == head) {
-- 
1.7.1

_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Reply via email to