mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
kerndat: handle the case when hugetlb isn't supported
Currently we check memfd_hugetlb by doing memfd_create("", MFD_HUGETLB).
If we see EINVAL we report that it's not supported, but we can also
get ENOENT error in such case in hugetlb_file_setup() while trying
to find proper hugetlbfs mount.
Reference:
06fb4ecfea/fs/hugetlbfs/inode.c (L1465)
Fixes: 4245e6b02f ("check: Add a check for using memfd with hugetlb")
Reported-by: Mr. Jenkins (ppc64le)
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
This commit is contained in:
parent
17a19676cd
commit
0c1f0256ff
1 changed files with 1 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ static bool kerndat_has_memfd_hugetlb(void)
|
|||
if (ret >= 0) {
|
||||
kdat.has_memfd_hugetlb = true;
|
||||
close(ret);
|
||||
} else if (ret == -1 && errno == EINVAL) {
|
||||
} else if (ret == -1 && (errno == EINVAL || errno == ENOENT)) {
|
||||
kdat.has_memfd_hugetlb = false;
|
||||
} else {
|
||||
pr_perror("Unexpected error from memfd_create(\"\", MFD_HUGETLB)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue