aboutsummaryrefslogtreecommitdiff
path: root/drivers/watchdog/ts72xx_wdt.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-23 11:40:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-18 10:54:56 -0700
commitbf597fb46661add46ee8c4705f5e4e1106bb1826 (patch)
treec3484958857d44152ba1d644636266873dcd71fc /drivers/watchdog/ts72xx_wdt.c
parenta04324b3536234679d98bc98fc37ccd755440446 (diff)
watchdog: ts72xx_wdt: locking bug in ioctl
commit 8612ed0d97abcf1c016d34755b7cf2060de71963 upstream. 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> Cc: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/ts72xx_wdt.c')
-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 4da59b4d73f..381999c0c30 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);