Commit 444702c6 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

compel: Print why memfd()-ing task fails

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent fc9fea15
...@@ -747,8 +747,11 @@ static int parasite_memfd_exchange(struct parasite_ctl *ctl, unsigned long size) ...@@ -747,8 +747,11 @@ static int parasite_memfd_exchange(struct parasite_ctl *ctl, unsigned long size)
fd = (int)(long)sret; fd = (int)(long)sret;
if (fd == -ENOSYS) if (fd == -ENOSYS)
return 1; return 1;
if (fd < 0) if (fd < 0) {
errno = -fd;
pr_perror("Can't create memfd in victim");
return fd; return fd;
}
ctl->map_length = round_up(size, page_size()); ctl->map_length = round_up(size, page_size());
lfd = ctl->ictx.open_proc(ctl->rpid, O_RDWR, "fd/%d", fd); lfd = ctl->ictx.open_proc(ctl->rpid, O_RDWR, "fd/%d", fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment