All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools: xenconsole: cleanup when clock_gettime fails.
@ 2016-02-03 10:43 Ian Campbell
  2016-02-03 10:49 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2016-02-03 10:43 UTC (permalink / raw)
  To: ian.jackson, wei.liu2, xen-devel; +Cc: Ian Campbell

All other error paths in the infinite loop in handle_io use break, so
as to free resources.

CID: 1351226

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/console/daemon/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index e2e7a6b..34666c4 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -1053,7 +1053,7 @@ void handle_io(void)
 						 POLLIN|POLLPRI);
 
 		if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
-			return;
+			break;
 		now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
 
 		/* Re-calculate any event counter allowances & unblock
-- 
2.1.4

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

* Re: [PATCH] tools: xenconsole: cleanup when clock_gettime fails.
  2016-02-03 10:43 [PATCH] tools: xenconsole: cleanup when clock_gettime fails Ian Campbell
@ 2016-02-03 10:49 ` Wei Liu
  2016-02-03 11:49   ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-02-03 10:49 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, ian.jackson, xen-devel

On Wed, Feb 03, 2016 at 10:43:47AM +0000, Ian Campbell wrote:
> All other error paths in the infinite loop in handle_io use break, so
> as to free resources.
> 
> CID: 1351226
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/console/daemon/io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
> index e2e7a6b..34666c4 100644
> --- a/tools/console/daemon/io.c
> +++ b/tools/console/daemon/io.c
> @@ -1053,7 +1053,7 @@ void handle_io(void)
>  						 POLLIN|POLLPRI);
>  
>  		if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
> -			return;
> +			break;
>  		now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
>  
>  		/* Re-calculate any event counter allowances & unblock
> -- 
> 2.1.4
> 

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

* Re: [PATCH] tools: xenconsole: cleanup when clock_gettime fails.
  2016-02-03 10:49 ` Wei Liu
@ 2016-02-03 11:49   ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2016-02-03 11:49 UTC (permalink / raw)
  To: Wei Liu; +Cc: ian.jackson, xen-devel

On Wed, 2016-02-03 at 10:49 +0000, Wei Liu wrote:
> On Wed, Feb 03, 2016 at 10:43:47AM +0000, Ian Campbell wrote:
> > All other error paths in the infinite loop in handle_io use break, so
> > as to free resources.
> > 
> > CID: 1351226
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

applied, thanks.

> 
> > ---
> >  tools/console/daemon/io.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
> > index e2e7a6b..34666c4 100644
> > --- a/tools/console/daemon/io.c
> > +++ b/tools/console/daemon/io.c
> > @@ -1053,7 +1053,7 @@ void handle_io(void)
> >  						 POLLIN|POLLPRI);
> >  
> >  		if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
> > -			return;
> > +			break;
> >  		now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec /
> > 1000000);
> >  
> >  		/* Re-calculate any event counter allowances & unblock

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-02-03 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 10:43 [PATCH] tools: xenconsole: cleanup when clock_gettime fails Ian Campbell
2016-02-03 10:49 ` Wei Liu
2016-02-03 11:49   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.