Messages in this thread Patch in this message | | | Date | Tue, 13 Oct 2009 14:48:34 -0400 (EDT) | From | Christoph Lameter <> | Subject | [FIX] patch "SLUB: Get rid of dynamic DMA kmalloc cache allocation" |
| |
Slight bug when creating kmalloc dma caches on the fly. When searching for an unused statically allocated kmem_cache structure we need to check for size == 0 not the other way around.
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
--- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2009-10-13 13:31:05.000000000 -0500 +++ linux-2.6/mm/slub.c 2009-10-13 13:31:36.000000000 -0500 @@ -2650,7 +2650,7 @@ static noinline struct kmem_cache *dma_k
s = NULL; for (i = 0; i < KMALLOC_CACHES; i++) - if (kmalloc_caches[i].size) + if (!kmalloc_caches[i].size) break;
BUG_ON(i >= KMALLOC_CACHES);
| |