Re: [PATCH 3.11-stable] watchdog: ts72xx_wdt: locking bug in ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonghwan Choi <jhbird.choi@xxxxxxxxxxx> writes:

> This patch looks like it should be in the 3.11-stable tree, should we apply
> it?

This seems to be applicable to older kernels as well.  I'm queuing it
for the 3.5 kernel.

Cheers,
-- 
Luis


>
> ------------------
>
> From: "Dan Carpenter <dan.carpenter@xxxxxxxxxx>"
>
> commit 8612ed0d97abcf1c016d34755b7cf2060de71963 upstream
>
> Calling the WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS and twice will cause a
> interruptible deadlock.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> Signed-off-by: Wim Van Sebroeck <wim@xxxxxxxxx>
> Signed-off-by: Jonghwan Choi <jhbird.choi@xxxxxxxxxxx>
> ---
>  drivers/watchdog/ts72xx_wdt.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
> index 4da59b4..381999c 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);
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]