Skip to content

Commit

Permalink
Merge "genalloc: stop crashing the system when destroying a pool"
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux Build Service Account authored and Gerrit - the friendly Code Review server committed Mar 2, 2014
2 parents d57c057 + 1e0cac6 commit 681644b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/genalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ int gen_pool_add_virt(struct gen_pool *pool, u64 virt, phys_addr_t phys,
struct gen_pool_chunk *chunk;
int nbits = size >> pool->min_alloc_order;
int nbytes = sizeof(struct gen_pool_chunk) +
(nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
BITS_TO_LONGS(nbits) * sizeof(long);

if (nbytes <= PAGE_SIZE)
chunk = kmalloc_node(nbytes, __GFP_ZERO, nid);
Expand Down

0 comments on commit 681644b

Please sign in to comment.