[CRIU] [PATCH] sk-unix: Print error message if external socket failure happened

Pavel Emelyanov xemul at parallels.com
Tue Mar 26 11:14:25 EDT 2013


On 03/26/2013 01:09 PM, Cyrill Gorcunov wrote:
> show_one_unix uses pr_debug to provide details (for developers
> mostly) but when regular user meets such a case better to
> warn him about problem rather than exit out silently.
> 
> Reported-by: Kevin Wilson <wkevils at gmail.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  sk-unix.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sk-unix.c b/sk-unix.c
> index 4905cd1..5aacb96 100644
> --- a/sk-unix.c
> +++ b/sk-unix.c
> @@ -432,11 +432,13 @@ int fix_external_unix_sockets(void)
>  		BUG_ON(sk->sd.already_dumped);
>  
>  		if (!opts.ext_unix_sk) {
> +			pr_err("External socket found but no option passed\n");

Add info about which exact option is missing.

>  			show_one_unix("Runaway socket", sk);
>  			goto err;
>  		}
>  
>  		if (sk->type != SOCK_DGRAM) {
> +			pr_err("External socket with unsupported type\n");
>  			show_one_unix("Ext stream not supported", sk);
>  			goto err;
>  		}
> 




More information about the CRIU mailing list