On Fri, 2007-04-20 at 12:44 -0700, Andrew Morton wrote: > > - local_irq_restore(flags); > > + arch_s2ram_enable_irqs(&flags); > > + BUG_ON(irqs_disabled()); > > return error; > > } > > The second BUG_ON() looks a bit fishy to me. If someone calls > suspend_enter() with local interrupts disabled, it will trigger. Huh, hm, I don't think it's valid to do that. I'm not sure why the code does irq_save/restore instead of just disable/enable. The only users of this function are in the power management core code (main.c and user.c) and they certainly always call it with interrupts enabled, the entry point for other users is pm_suspend() and that surely cannot be called with interrupts disabled. Rafael? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm