From: Jiri Slaby <jslaby@suse.cz>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com,
Tomaz Mertelj <tomaz.mertelj@guest.arnes.si>,
Jean Delvare <khali@linux-fr.org>
Subject: [PATCH 1/1] HWMON: amc6821, fix lock imbalance
Date: Sat, 16 Jan 2010 10:28:01 +0100 [thread overview]
Message-ID: <1263634081-6644-1-git-send-email-jslaby@suse.cz> (raw)
Stanse found a lock imbalance in set_fan1_div. data->update_lock
is unlocked twice on a fail path.
Triggerable by writing value other than 2 and 4 to fan1_div.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Tomaz Mertelj <tomaz.mertelj@guest.arnes.si>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
drivers/hwmon/amc6821.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c
index 1c89d92..fa9708c 100644
--- a/drivers/hwmon/amc6821.c
+++ b/drivers/hwmon/amc6821.c
@@ -686,7 +686,6 @@ static ssize_t set_fan1_div(
data->fan1_div = 4;
break;
default:
- mutex_unlock(&data->update_lock);
count = -EINVAL;
goto EXIT;
}
--
1.6.5.7
next reply other threads:[~2010-01-16 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 9:28 Jiri Slaby [this message]
2010-01-16 10:02 ` Jean Delvare
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=1263634081-6644-1-git-send-email-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=jirislaby@gmail.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tomaz.mertelj@guest.arnes.si \
/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
all inboxes | Powered by JetHome®