projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
984bc96
)
genalloc: fix allocation from end of pool
author
Imre Deak
<
[email protected]
>
Tue, 29 Jun 2010 22:05:15 +0000
(15:05 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 29 Jun 2010 22:29:30 +0000
(15:29 -0700)
bitmap_find_next_zero_area requires the size of the bitmap, we instead
passed the last suitable position. This made it impossible to allocate
from the end of the pool.
Fixes a regression introduced by
243797f59b748f679ab88d456fcc4f92236d724b
("genalloc: use bitmap_find_next_zero_area").
Signed-off-by: Imre Deak <
[email protected]
>
Cc: Zygo Blaxell <
[email protected]
>
Cc: Tejun Heo <
[email protected]
>
Acked-by: Akinobu Mita <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/genalloc.c
patch
|
blob
|
history
diff --git
a/lib/genalloc.c
b/lib/genalloc.c
index 736c3b06398e522a7ad3d0ee846d77163436a334..1923f1490e72618b36756b326bbd2e280d71bd49 100644
(file)
--- a/
lib/genalloc.c
+++ b/
lib/genalloc.c
@@
-128,7
+128,6
@@
unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
end_bit = (chunk->end_addr - chunk->start_addr) >> order;
- end_bit -= nbits + 1;
spin_lock_irqsave(&chunk->lock, flags);
start_bit = bitmap_find_next_zero_area(chunk->bits, end_bit, 0,