mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +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:
parent
a0662df6f9
commit
0e22e245e5
@ -375,10 +375,13 @@ void *remote_mmap(struct parasite_ctl *ctl,
|
|||||||
if (err < 0)
|
if (err < 0)
|
||||||
return NULL;
|
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 (IS_ERR_VALUE(map)) {
|
||||||
if (map == -EACCES && (prot & PROT_WRITE) && (prot & PROT_EXEC))
|
pr_err("remote mmap() failed: %s\n", strerror(-map));
|
||||||
pr_warn("mmap(PROT_WRITE | PROT_EXEC) failed for %d, "
|
|
||||||
"check selinux execmem policy\n", ctl->rpid);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user