Skip to content

Commit

Permalink
watchdog: ts72xx_wdt: locking bug in ioctl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Wim Van Sebroeck committed Oct 13, 2013
1 parent 9d05746 commit 8612ed0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/watchdog/ts72xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8612ed0

Please sign in to comment.