Re: [PATCH] watchdog/xen: don't unconditionally enable the watchdog during resume

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

 



On Mon, Mar 19, 2012 at 09:30:33AM +0000, Jan Beulich wrote:
> This was found to be a problem particularly after guest migration.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Reported-by: Wouter de Geus <benv-xensource.com@xxxxxxxxxxxxx>
> Reported-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> Tested-by: Wouter de Geus <benv-xensource.com@xxxxxxxxxxxxx>

Looks good to me.

Wim, would you like me to carry it for 3.4 or are you OK doing it?

Thanks!
> 
> ---
>  drivers/watchdog/xen_wdt.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> --- 3.3/drivers/watchdog/xen_wdt.c
> +++ 3.3-xen-watchdog-resume/drivers/watchdog/xen_wdt.c
> @@ -299,11 +299,18 @@ static void xen_wdt_shutdown(struct plat
>  
>  static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state)
>  {
> -	return xen_wdt_stop();
> +	typeof(wdt.id) id = wdt.id;
> +	int rc = xen_wdt_stop();
> +
> +	wdt.id = id;
> +	return rc;
>  }
>  
>  static int xen_wdt_resume(struct platform_device *dev)
>  {
> +	if (!wdt.id)
> +		return 0;
> +	wdt.id = 0;
>  	return xen_wdt_start();
>  }
>  
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux