Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBui Quang Minh <minhquangbui99@gmail.com>2022-11-08 17:10:52 +0300
committerAndrei Vagin <avagin@gmail.com>2022-11-11 22:20:22 +0300
commit614fb7de02f72a486c532b2124a4334de3c307e5 (patch)
treebd331f8b289277afd87eb8e36df89b9aeef5c8ed
parent979c84209bc2662b9bd2666702906de4e11190a9 (diff)
kerndat: Mark memfd_create(MFD_HUGETLB) unavailable when ENOSYS is returned
Some users on Raspberry Pi report that the kerndat checking for memfd_create(MFD_HUGETLB) support returns ENOSYS even when memfd_create syscall is available. We currently treat this error as unexpected and return error. This commit marks the memfd_create(MFD_HUGETLB) as unavailable when ENOSYS is returned. Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
-rw-r--r--criu/kerndat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/criu/kerndat.c b/criu/kerndat.c
index a209190ee..5b567e79f 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -500,7 +500,7 @@ static bool kerndat_has_memfd_hugetlb(void)
if (ret >= 0) {
kdat.has_memfd_hugetlb = true;
close(ret);
- } else if (ret == -1 && (errno == EINVAL || errno == ENOENT)) {
+ } else if (ret == -1 && (errno == EINVAL || errno == ENOENT || errno == ENOSYS)) {
kdat.has_memfd_hugetlb = false;
} else {
pr_perror("Unexpected error from memfd_create(\"\", MFD_HUGETLB)");