Skip to content

Commit

Permalink
MDEV-18946: innodb: buffer_pool - unallocate large pages requires size
Browse files Browse the repository at this point in the history
MDEV-10814 introduce a bug where the size argument to
deallocate_large was passed true, evaluating to 1, as the size.

When this is passed to munmap this resulted in EINVAL and the
page not being released. This only occured the buf_pool_free_instance
when called on shutdown so no impact as the process termination
correctly frees the memory.
  • Loading branch information
grooverdan committed Mar 16, 2019
1 parent 51e48b9 commit 8678a10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ buf_pool_free_instance(
}

buf_pool->allocator.deallocate_large(
chunk->mem, &chunk->mem_pfx, true);
chunk->mem, &chunk->mem_pfx, chunk->mem_size(), true);
}

for (ulint i = BUF_FLUSH_LRU; i < BUF_FLUSH_N_TYPES; ++i) {
Expand Down Expand Up @@ -2893,7 +2893,7 @@ buf_pool_resize()
}

buf_pool->allocator.deallocate_large(
chunk->mem, &chunk->mem_pfx, true);
chunk->mem, &chunk->mem_pfx, chunk->mem_size(), true);

sum_freed += chunk->size;

Expand Down

0 comments on commit 8678a10

Please sign in to comment.