linux/fs/pstore
Don Zickus abd4d5587b pstore: change mutex locking to spin_locks
pstore was using mutex locking to protect read/write access to the
backend plug-ins.  This causes problems when pstore is executed in
an NMI context through panic() -> kmsg_dump().

This patch changes the mutex to a spin_lock_irqsave then also checks to
see if we are in an NMI context.  If we are in an NMI and can't get the
lock, just print a message stating that and blow by the locking.

All this is probably a hack around the bigger locking problem but it
solves my current situation of trying to sleep in an NMI context.

Tested by loading the lkdtm module and executing a HARDLOCKUP which
will cause the machine to panic inside the nmi handler.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2011-08-16 11:55:58 -07:00
..
inode.c pstore: defer inserting OOPS entries into pstore 2011-08-16 11:53:01 -07:00
internal.h pstore: defer inserting OOPS entries into pstore 2011-08-16 11:53:01 -07:00
Kconfig Fix common misspellings 2011-03-31 11:26:23 -03:00
Makefile pstore: new filesystem interface to platform persistent storage 2010-12-28 14:25:21 -08:00
platform.c pstore: change mutex locking to spin_locks 2011-08-16 11:55:58 -07:00