linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2/2] watchdog: ts72xx_wdt: locking bug in ioctl
@ 2013-08-23  8:40 Dan Carpenter
  2013-10-01 15:44 ` [2/2] " Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-08-23  8:40 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: linux-watchdog, kernel-janitors

Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
interruptible deadlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index 9125b0f..3ddd527 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -311,7 +311,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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-01 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23  8:40 [patch 2/2] watchdog: ts72xx_wdt: locking bug in ioctl Dan Carpenter
2013-10-01 15:44 ` [2/2] " Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).