[CRIU] [PATCH] dump: do not fail dump when robust_lists are disabled
Filipe Brandenburger
filbranden at google.com
Tue Jun 24 16:32:55 PDT 2014
Robust lists may be disabled, for example if the "futex_cmpxchg_enabled"
variable in the kernel is unset.
Detect that case by checking that the "get_robust_list" syscall returns ENOSYS
and assume an empty robust_list in that case.
Tested: Successfully ran the zdtm test suite on a kernel where the
"get_robust_list" syscall is disabled.
---
cr-dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cr-dump.c b/cr-dump.c
index 86dedce8982a..31f545014d19 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -539,7 +539,7 @@ static int get_task_futex_robust_list(pid_t pid, ThreadCoreEntry *info)
int ret;
ret = sys_get_robust_list(pid, &head, &len);
- if (ret) {
+ if (ret && ret != -ENOSYS) {
pr_err("Failed obtaining futex robust list on %d\n", pid);
return -1;
}
--
1.9.3
More information about the CRIU
mailing list