commit | 681644be344290f7e7c47fe914f1b1e134f0f569 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Sat Mar 01 23:17:53 2014 -0800 |
committer | Gerrit - the friendly Code Review server <code-review@localhost> | Sat Mar 01 23:17:53 2014 -0800 |
tree | e46a91a2051eb02b345e117f3572799eb0a2bf33 | |
parent | d57c057c72dc55b320590a0412e092650457db49 [diff] | |
parent | 1e0cac6a52d99462f30292415a8eb49115ce7bd5 [diff] |
Merge "genalloc: stop crashing the system when destroying a pool"
diff --git a/lib/genalloc.c b/lib/genalloc.c index 0218f4b..fd699ca 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c
@@ -177,7 +177,7 @@ 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);