]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/nvram: Add spinlock to oops_to_nvram to prevent oops in compression code.
authorAnton Blanchard <anton@samba.org>
Wed, 30 Nov 2011 15:46:45 +0000 (15:46 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 8 Dec 2011 03:22:54 +0000 (14:22 +1100)
commit2ee77fa25da17efbc789e6b2193024999530660b
tree428fa9916b85660cbd84d4722724c245c1bda0c3
parent8c2bb47a5563b01d0cb07be2c8c60cbe0e295eae
powerpc/nvram: Add spinlock to oops_to_nvram to prevent oops in compression code.

When issuing a system reset we almost always oops in the oops_to_nvram
code because multiple CPUs are using the deflate work area. Add a
spinlock to protect it.

To play it safe I'm using trylock to avoid locking up if the NVRAM
code oopses. This means we might miss multiple CPUs oopsing at exactly
the same time but I think it's best to play it safe for now. Once we
are happy with the reliability we can change it to a full spinlock.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/nvram.c