lkml.org 
[lkml]   [2010]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromJiri Slaby <>
Subject[PATCH 1/1] HWMON: amc6821, fix lock imbalance
DateSat, 16 Jan 2010 10:28:01 +0100
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


\
 
 \ /
  Last update: 2010-01-16 10:31    [from the cache]
©2003-2010