tty: Make params setup synchronous

Submitted by Cyrill Gorcunov on March 12, 2019, 6:55 p.m.

Details

Message ID 20190312185513.20069-1-gorcunov@gmail.com
State Accepted
Series "tty: Make params setup synchronous"
Headers show

Commit Message

Cyrill Gorcunov March 12, 2019, 6:55 p.m.
It was never designed to run params in ansync mode,
and i always been against this change because async
here is too fragile.

p.s.:

I think this might be a reason for

https://github.com/checkpoint-restore/criu/issues/647

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/tty.c b/criu/tty.c
index ad957485829a..6fe11530a73c 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -894,7 +894,7 @@  static int restore_tty_params(int fd, struct tty_info *info)
 		}
 	}
 
-	return userns_call(do_restore_tty_parms, UNS_ASYNC, &p, sizeof(p), fd);
+	return userns_call(do_restore_tty_parms, 0, &p, sizeof(p), fd);
 }
 
 /*

Comments

Andrei Vagin March 20, 2019, 1:27 a.m.
Applied, thanks!

On Tue, Mar 12, 2019 at 09:55:13PM +0300, Cyrill Gorcunov wrote:
> It was never designed to run params in ansync mode,
> and i always been against this change because async
> here is too fragile.
> 
> p.s.:
> 
> I think this might be a reason for
> 
> https://github.com/checkpoint-restore/criu/issues/647
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>  criu/tty.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/tty.c b/criu/tty.c
> index ad957485829a..6fe11530a73c 100644
> --- a/criu/tty.c
> +++ b/criu/tty.c
> @@ -894,7 +894,7 @@ static int restore_tty_params(int fd, struct tty_info *info)
>  		}
>  	}
>  
> -	return userns_call(do_restore_tty_parms, UNS_ASYNC, &p, sizeof(p), fd);
> +	return userns_call(do_restore_tty_parms, 0, &p, sizeof(p), fd);
>  }
>  
>  /*
> -- 
> 2.20.1
>