[CRIU] [PATCH] restorer: Print error code from sys_set_robust_list

Cyrill Gorcunov gorcunov at openvz.org
Wed Mar 27 13:09:55 EDT 2013


Some syscalls return error code, so for easier debugging
instead of zapping it -- print it together with error
message.

And make error message more detailed as well.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 pie/restorer.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pie/restorer.c b/pie/restorer.c
index a57c42b..400dcb4 100644
--- a/pie/restorer.c
+++ b/pie/restorer.c
@@ -206,8 +206,12 @@ static int restore_thread_common(struct rt_sigframe *sigframe,
 	sys_set_tid_address((int *)decode_pointer(args->clear_tid_addr));
 
 	if (args->has_futex) {
-		if (sys_set_robust_list(decode_pointer(args->futex_rla), args->futex_rla_len)) {
-			pr_err("Robust list err\n");
+		int ret;
+
+		ret = sys_set_robust_list(decode_pointer(args->futex_rla),
+					  args->futex_rla_len);
+		if (ret) {
+			pr_err("Failed to recover futex robust list: %d\n", ret);
 			return -1;
 		}
 	}
-- 
1.8.1.4



More information about the CRIU mailing list