From 43da190cfc02cd2bada93d910e3fc06f158cc9c0 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Tue, 15 May 2018 23:42:23 +0300 Subject: [PATCH] lazy-pages: handle_exit: set uffd to negative value instead of 0 The only use for the userfault file descriptor after the process exited is for debug logs. Using negative value instead of 0 makes logs more readable. Signed-off-by: Mike Rapoport Signed-off-by: Andrei Vagin --- criu/uffd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/uffd.c b/criu/uffd.c index e60c782ee..3fbc5c404 100644 --- a/criu/uffd.c +++ b/criu/uffd.c @@ -789,7 +789,7 @@ static int handle_exit(struct lazy_pages_info *lpi) return -1; free_iovs(lpi); close(lpi->lpfd.fd); - lpi->lpfd.fd = 0; + lpi->lpfd.fd = -lpi->lpfd.fd; lpi->exited = true; /* keep it for tracking in-flight requests and for the summary */