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

From: Anton Blanchard <[email-masked]>
Date: Thu, 1 Dec 2011 13:26:22 +1100

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