All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Subject: Re: [PATCH] rwsem generic spinlock: use IRQ save/restore spinlocks
Date: Wed, 05 May 2010 16:59:51 -0700	[thread overview]
Message-ID: <87vdb1x5l4.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1270749350-25152-1-git-send-email-khilman@deeprootsystems.com> (Kevin Hilman's message of "Thu\,  8 Apr 2010 10\:55\:50 -0700")

Kevin Hilman <khilman@deeprootsystems.com> writes:

> rwsems can be used with IRQs disabled, particularily in early boot
> before IRQs are enabled.  Currently the spin_unlock_irq() usage in the
> slow-path will unconditionally enable interrupts and cause problems
> early in boot where interrupts are not yet initialized or enabled.
>
> This patch uses save/restore versions of IRQ spinlocks in the slowpath
> to ensure interrupts are not unintentionally enabled in the case where
> the rwsem is used with IRQs disabled.
>
> Idea for this fix suggested by H. Peter Anvin.
>
> Tested on TI OMAP3-based platform (ARM Cortex-A8)
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Rabin Vincent <rabin@rab.in>
> Cc: H. Peter Anvin <hpa@zytor.com>
> LKML-Reference: <alpine.LFD.2.00.1004010904540.3707@i5.linux-foundation.org>
> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>

For the benefit of the l-o archives...

This patch was merged into mainline in .34-rc6 and fixes potential
deadlocks on boot, seen especially when using the SLUB allocator.

Kevin

      reply	other threads:[~2010-05-05 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 17:55 [PATCH] rwsem generic spinlock: use IRQ save/restore spinlocks Kevin Hilman
2010-05-05 23:59 ` Kevin Hilman [this message]

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=87vdb1x5l4.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.