[PATCH 4/5] ppc64: make soft_enabled irqs preempt safe
Paul Mackerras
paulus at samba.org
Fri Nov 10 20:18:12 EST 2006
Hugh Dickins writes:
> local_irq_restore be careful to access hard_enabled and lppaca before
> setting soft_enabled, which may well permit preemption. Use local_paca
The reason for testing hard_enabled *after* setting soft_enabled is to
avoid a race. If we load hard_enabled first, as your patch does, then
an interrupt could come in between that load and the store that sets
soft_enabled, and we would miss that and not hard-enable as we should.
I'm not sure what the solution is. I suppose we could disable
preemption, although I'd rather something lighter-weight if possible.
Paul.
More information about the Linuxppc-dev
mailing list