<p dir="ltr"><br>
On Mar 16, 2016 3:08 AM, "Laurent Dufour" <<a href="mailto:ldufour@linux.vnet.ibm.com">ldufour@linux.vnet.ibm.com</a>> wrote:<br>
> The commit 16e673c2f6a0 ("cr-check: Inspect errno on syscall<br>
> failures") reverts the way the returned the error returned by kcmp is<br>
> checked. As a consequence 'criu check' is always failing with the<br>
> following message:<br>
><br>
> Error (cr-check.c:165): System call kcmp is not supported: No such process<br>
><br>
> This patch ensure is reported only if syscall(SYS_kcmp) returns<br>
> ENOSYS.</p>
<p dir="ltr">Looks good, sorry for the mistake in the conversion.</p>
<p dir="ltr">Saied told me the same thing yesterday, I think he was incorporating a similar fix in his refactor of cr-check too.</p>
<p dir="ltr">Thanks for the fix!</p>
<p dir="ltr">> Fixes: 16e673c2f6a0 ("cr-check: Inspect errno on syscall failures")<br>
> Cc: Filipe Brandenburger <<a href="mailto:filbranden@google.com">filbranden@google.com</a>><br>
> Cc: Pavel Emelyanov <<a href="mailto:xemul@virtuozzo.com">xemul@virtuozzo.com</a>><br>
> Signed-off-by: Laurent Dufour <<a href="mailto:ldufour@linux.vnet.ibm.com">ldufour@linux.vnet.ibm.com</a>><br>
> ---<br>
> criu/cr-check.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/criu/cr-check.c b/criu/cr-check.c<br>
> index 0572c60858a4..ea0368427a55 100644<br>
> --- a/criu/cr-check.c<br>
> +++ b/criu/cr-check.c<br>
> @@ -161,7 +161,7 @@ static int check_kcmp(void)<br>
> {<br>
> int ret = syscall(SYS_kcmp, getpid(), -1, -1, -1, -1);<br>
><br>
> - if (ret < 0 && errno != ENOSYS) {<br>
> + if (ret < 0 && errno == ENOSYS) {<br>
> pr_perror("System call kcmp is not supported");<br>
> return -1;<br>
> }<br>
> --<br>
> 1.9.1<br>
><br>
</p>