summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2016-11-21 10:56:25 -0800
committerDmitry Shmidt <dimitrysh@google.com>2016-11-21 10:56:25 -0800
commit84dc474f3c33c4fbbe42f46876e0dde502e60ad0 (patch)
tree1c60e8369668a67042e47774ae4a389bbfc239b6 /lib
parent40ceb2c69964f8bde97d4ded4306508db16fd365 (diff)
parent4eb9a81002485a7abfa53a334dde5bc10328079f (diff)
Merge tag 'v4.4.34' into android-4.4.y
This is the 4.4.34 stable release Change-Id: Ic90323945584a7173f54595e0482d26fafd10174
Diffstat (limited to 'lib')
-rw-r--r--lib/genalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c
index 116a166b096f..27aa9c629d13 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -273,7 +273,7 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
struct gen_pool_chunk *chunk;
unsigned long addr = 0;
int order = pool->min_alloc_order;
- int nbits, start_bit = 0, end_bit, remain;
+ int nbits, start_bit, end_bit, remain;
#ifndef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
BUG_ON(in_nmi());
@@ -288,6 +288,7 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
if (size > atomic_read(&chunk->avail))
continue;
+ start_bit = 0;
end_bit = chunk_size(chunk) >> order;
retry:
start_bit = pool->algo(chunk->bits, end_bit, start_bit, nbits,