summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-23 11:40:59 +0300
committerWim Van Sebroeck <wim@iguana.be>2013-10-13 20:01:50 +0200
commit8612ed0d97abcf1c016d34755b7cf2060de71963 (patch)
treeba08f8831713c10a9f9c63214185063ef294c967
parent9d05746e7b16d8565dddbe3200faa1e669d23bbf (diff)
downloadop-kernel-dev-8612ed0d97abcf1c016d34755b7cf2060de71963.zip
op-kernel-dev-8612ed0d97abcf1c016d34755b7cf2060de71963.tar.gz
watchdog: ts72xx_wdt: locking bug in ioctl
Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a interruptible deadlock. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r--drivers/watchdog/ts72xx_wdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index 42913f1..c9b0c62 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -310,7 +310,8 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd,
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
+ error = put_user(0, p);
+ break;
case WDIOC_KEEPALIVE:
ts72xx_wdt_kick(wdt);
OpenPOWER on IntegriCloud