public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg@redhat.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org, Don Zickus <dzickus@redhat.com>
Subject: Re: pstore: change mutex locking to spin_locks
Date: Fri, 12 Aug 2011 18:59:12 +0100	[thread overview]
Message-ID: <20110812175912.GA16704@srcf.ucam.org> (raw)
In-Reply-To: <4e4568eb10165cbab6@agluck-desktop.sc.intel.com>

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

  reply	other threads:[~2011-08-12 17:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 17:54 pstore: change mutex locking to spin_locks Luck, Tony
2011-08-12 17:59 ` Matthew Garrett [this message]
2011-08-17 21:22 ` Andrew Morton
2011-08-17 21:47   ` Peter Zijlstra
2011-08-18 13:04     ` Don Zickus
2011-08-18 15:26       ` Peter Zijlstra
2011-08-18 12:58   ` Don Zickus
2011-08-18 14:37     ` Peter Zijlstra
2011-08-18 16:33     ` Luck, Tony
2011-08-18 17:25       ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110812175912.GA16704@srcf.ucam.org \
    --to=mjg@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox