Skip to content

Commit

Permalink
compel: use a correct name format for vma files in /proc/pid/map_files/
Browse files Browse the repository at this point in the history
Currently we use the "map_files/%p-%p" format, but actually it should
be "map_files/%lx-%lx".

The kernel could handle both formats, but recently Alexey Dobriyan fixed
the kernel and it accept only the second format.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
  • Loading branch information
avagin committed Nov 29, 2017
1 parent 62a4edc commit 3524942
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compel/src/lib/infect.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ static int parasite_mmap_exchange(struct parasite_ctl *ctl, unsigned long size)

ctl->map_length = round_up(size, page_size());

fd = ctl->ictx.open_proc(ctl->rpid, O_RDWR, "map_files/%p-%p",
ctl->remote_map, ctl->remote_map + ctl->map_length);
fd = ctl->ictx.open_proc(ctl->rpid, O_RDWR, "map_files/%lx-%lx",
(long)ctl->remote_map, (long)ctl->remote_map + ctl->map_length);
if (fd < 0)
return -1;

Expand Down

0 comments on commit 3524942

Please sign in to comment.