2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 13:28:27 +00:00

x86/compel/infect: Be verbose on remote mmap failure

Error-case print missing.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Dmitry Safonov 2019-05-02 02:34:44 +01:00 committed by Andrei Vagin
parent a0662df6f9
commit 0e22e245e5

View File

@ -375,10 +375,13 @@ void *remote_mmap(struct parasite_ctl *ctl,
if (err < 0)
return NULL;
if (map == -EACCES && (prot & PROT_WRITE) && (prot & PROT_EXEC)) {
pr_warn("mmap(PROT_WRITE | PROT_EXEC) failed for %d, "
"check selinux execmem policy\n", ctl->rpid);
return NULL;
}
if (IS_ERR_VALUE(map)) {
if (map == -EACCES && (prot & PROT_WRITE) && (prot & PROT_EXEC))
pr_warn("mmap(PROT_WRITE | PROT_EXEC) failed for %d, "
"check selinux execmem policy\n", ctl->rpid);
pr_err("remote mmap() failed: %s\n", strerror(-map));
return NULL;
}