From: Greg KH <greg@kroah.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [stable] [IA64 PATCH for v2.6.32 to v2.6.35] ia64: fix siglock
Date: Thu, 23 Sep 2010 18:16:41 +0000 [thread overview]
Message-ID: <20100923181641.GJ23040@kroah.com> (raw)
In-Reply-To: <4c927cb2184948077a@agluck-desktop.sc.intel.com>
On Thu, Sep 16, 2010 at 01:23:14PM -0700, Luck, Tony wrote:
> When ia64 converted to using ticket locks, an inline implementation
> of trylock/unlock in fsys.S was missed. This was not noticed because
> in most circumstances it simply resulted in using the slow path because
> the siglock was apparently not available (under old spinlock rules).
>
> Problems occur when the ticket spinlock has value 0x0 (when first
> initialised, or when it wraps around). At this point the fsys.S
> code acquires the lock (changing the 0x0 to 0x1. If another process
> attempts to get the lock at this point, it will change the value from
> 0x1 to 0x2 (using new ticket lock rules). Then the fsys.S code will
> free the lock using old spinlock rules by writing 0x0 to it. From
> here a variety of bad things can happen.
>
> Fix to use the new ticket lock algorithm.
>
> Cc: Petr Tesarik <ptesarik@suse.cz>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
>
> ---
>
> This went upstream in two pieces - there was a bug in the first attempt
> (my code), the second (by Petr) fixes the bug (and also makes the code
> much prettier). Patch below is the combination of both so we don't
> make a bisection trap for people to fall into. If this violates stable
> rules, then feel free to just cherry pick the two commits.
>
> commit f574c843191728d9407b766a027f779dcd27b272
> [IA64] fix siglock
> commit 2d2b6901649a62977452be85df53eda2412def24
> [IA64] Optimize ticket spinlocks in fsys_rt_sigprocmask
I just applied these two patches in-order, to make it more obvious as to
where things came from.
thanks,
greg k-h
prev parent reply other threads:[~2010-09-23 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 20:23 [IA64 PATCH for v2.6.32 to v2.6.35] ia64: fix siglock in fsys_rt_sigprocmask Luck, Tony
2010-09-23 18:16 ` Greg KH [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=20100923181641.GJ23040@kroah.com \
--to=greg@kroah.com \
--cc=linux-ia64@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox