mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] HWMON: amc6821, fix lock imbalance
@ 2010-01-16  9:28 Jiri Slaby
  2010-01-16 10:02 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2010-01-16  9:28 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, jirislaby, Tomaz Mertelj, Jean Delvare

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-16 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-16  9:28 [PATCH 1/1] HWMON: amc6821, fix lock imbalance Jiri Slaby
2010-01-16 10:02 ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome