mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
watchdog: ts72xx_wdt: locking bug in ioctl
commit 8612ed0d97 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4b3ea63f5a
commit
e2dcd671f7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user