[PATCH] powerpc/nvram: Add spinlock to oops_to_nvram to prevent oops in compression code.

Anton Blanchard anton at samba.org
Thu Dec 1 13:26:22 EST 2011


Hi Ben,

> How would we miss ?
> 
> trylock does loop on stwcx. failure, it doesn't loop if the lock is
> -taken-, so if the lock is only used for actually dealing with the
> oops the only "miss" is because somebody already got it... or am I
> missing something ?

I'm thinking of two CPUs that enter at exactly the same time either
through a system reset or an ugly bug (writing junk at 0x900 so the
decrementer exception gets an oops). Probably unlikely enough that we
don't care.

Anton


More information about the Linuxppc-dev mailing list