diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-23 12:40:59 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-22 12:02:25 +0400 |
commit | d3c113cbc827fcd0d4b4cf7a4ad7a6954e16a9ed (patch) | |
tree | 67dd84d51b6dc412884f9739c6dd49be77448bf2 /drivers/watchdog | |
parent | 8958138db8b16cca3c2fa1516fb9a800d1c0b6fb (diff) | |
download | linux-d3c113cbc827fcd0d4b4cf7a4ad7a6954e16a9ed.tar.xz |
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')
-rw-r--r-- | drivers/watchdog/ts72xx_wdt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index 8df050d800e6..1c53745ffb2c 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); |