mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
Merge "genalloc: stop crashing the system when destroying a pool"
This commit is contained in:
commit
681644be34
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue