mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-24 02:35:41 +00:00
kerndat: Handle non-root mode when checking uffd
When criu is run as user it fails and exits because of kerndat_uffd() returning -1. This, in turn, happens after uffd = syscall(SYS_userfaultfd, flags); which only works for root. In the change it ignores the permission error and proceeds further just like it's done for e.g. pagemap checking. Signed-off-by: Nithin Jaikar J <jaikar006@gmail.com>
This commit is contained in:
parent
2402192b54
commit
cfdeac4a4d
1 changed files with 4 additions and 1 deletions
|
|
@ -919,7 +919,10 @@ static int kerndat_uffd(void)
|
|||
if (uffd < 0) {
|
||||
if (uffd == -ENOSYS)
|
||||
return 0;
|
||||
|
||||
if (uffd == -EPERM) {
|
||||
pr_info("Lazy pages are disabled\n");
|
||||
return 0;
|
||||
}
|
||||
pr_err("Lazy pages are not available\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue