[CRIU] [PATCH RESEND v3 3/4] lazy-pages: send_uffd: make sure mutex is unlocked on error paths

Mike Rapoport rppt at linux.vnet.ibm.com
Fri Nov 4 08:08:03 PDT 2016


Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 criu/uffd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/criu/uffd.c b/criu/uffd.c
index d9668d8..a2b26d7 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -177,10 +177,9 @@ static int send_uffd(int sendfd, int pid)
 		goto out;
 	}
 
-	mutex_unlock(lazy_sock_mutex);
-
 	ret = 0;
 out:
+	mutex_unlock(lazy_sock_mutex);
 	close(fd);
 	return ret;
 }
-- 
1.9.1



More information about the CRIU mailing list