From: "Jan Beulich" <jbeulich@novell.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] fix SAL info mutex handling
Date: Tue, 05 May 2009 12:53:13 +0000 [thread overview]
Message-ID: <4A0052D9.76EA.0078.0@novell.com> (raw)
Using up() on a mutex that wasn't necessarily acquired seems wrong.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
arch/ia64/kernel/salinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.30-rc4/arch/ia64/kernel/salinfo.c 2009-04-30 09:42:36.000000000 +0200
+++ 2.6.30-rc4-ia64-salinfo-lock/arch/ia64/kernel/salinfo.c 2009-05-04 11:31:45.000000000 +0200
@@ -192,8 +192,8 @@ struct salinfo_platform_oemdata_parms {
static void
salinfo_work_to_do(struct salinfo_data *data)
{
- down_trylock(&data->mutex);
- up(&data->mutex);
+ if (down_trylock(&data->mutex) = 0)
+ up(&data->mutex);
}
static void
next reply other threads:[~2009-05-05 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 12:53 Jan Beulich [this message]
2009-05-05 13:17 ` [PATCH] fix SAL info mutex handling Matthew Wilcox
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=4A0052D9.76EA.0078.0@novell.com \
--to=jbeulich@novell.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