diff options
author | Andrei Vagin <avagin@gmail.com> | 2022-04-27 06:51:47 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@google.com> | 2022-05-13 09:07:35 +0300 |
commit | be6d7ca8e61df8bd59f491279a3bd982c14911e4 (patch) | |
tree | a7e0ca3b6ed04ac18f6d4926d6e1d6197d90dd8b | |
parent | 3c8aa309fc703f5f8b8c6779360b828a99fceff8 (diff) |
page-pipe: fix limiting a pipe size
But actually, 5a92f100b88e probably has to be reverted as a whole.
PIPE_MAX_SIZE is the hard limit to avoid PAGE_ALLOC_COSTLY_ORDER
allocations in the kernel. But F_SETPIPE_SZ rounds up a requested pipe
size to a power-of-2 pages. It means that when we request PIPE_MAX_SIZE
that isn't a power-of-2 number, we actually request a pipe size greater
than PIPE_MAX_SIZE.
Fixes: 5a92f100b88e ("page-pipe: Resize up to PIPE_MAX_SIZE")
Signed-off-by: Andrei Vagin <avagin@gmail.com>
-rw-r--r-- | criu/page-pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/criu/page-pipe.c b/criu/page-pipe.c index 5a7e50bc1..54dc3ccc4 100644 --- a/criu/page-pipe.c +++ b/criu/page-pipe.c @@ -56,7 +56,7 @@ static inline int ppb_resize_pipe(struct page_pipe_buf *ppb) if (new_size > PIPE_MAX_SIZE) { if (ppb->pipe_size < PIPE_MAX_SIZE) - ppb->pipe_size = PIPE_MAX_SIZE; + new_size = PIPE_MAX_SIZE; else return 1; } |