diff options
author | Dennis Zhou <dennis@kernel.org> | 2019-02-22 00:50:19 +0100 |
---|---|---|
committer | Dennis Zhou <dennis@kernel.org> | 2019-03-13 20:25:31 +0100 |
commit | 8e5a2b9893f36457582596fdade10f6feb2797ee (patch) | |
tree | cf056a83bf1bc9c2d2264491486920c481b50f82 /mm/percpu.c | |
parent | Merge tag 'selinux-pr-20190312' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-8e5a2b9893f36457582596fdade10f6feb2797ee.tar.xz linux-8e5a2b9893f36457582596fdade10f6feb2797ee.zip |
percpu: update free path with correct new free region
When updating the chunk's contig_hint on the free path of a hint that
does not touch the page boundaries, it was incorrectly using the
starting offset of the free region and the block's contig_hint. This
could lead to incorrect assumptions about fit given a size and better
alignment of the start. Fix this by using (end - start) as this is only
called when updating a hint within a block.
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'mm/percpu.c')
-rw-r--r-- | mm/percpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index 2e6fc8d552c9..938f295a60d4 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -871,7 +871,7 @@ static void pcpu_block_update_hint_free(struct pcpu_chunk *chunk, int bit_off, pcpu_chunk_refresh_hint(chunk); else pcpu_chunk_update(chunk, pcpu_block_off_to_off(s_index, start), - s_block->contig_hint); + end - start); } /** |