lkml.org 
[lkml]   [2011]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pstore: change mutex locking to spin_locks
On Fri, Aug 12, 2011 at 10:54:51AM -0700, Luck, Tony wrote:
> From: Don Zickus <dzickus@redhat.com>
>
> 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>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>

--
Matthew Garrett | mjg59@srcf.ucam.org


\
 
 \ /
  Last update: 2011-08-12 20:01    [W:0.071 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site