Index: linux-2.6.16-rc6-mm2/mm/slab.c =================================================================== --- linux-2.6.16-rc6-mm2.orig/mm/slab.c 2006-03-21 19:12:41.000000000 -0800 +++ linux-2.6.16-rc6-mm2/mm/slab.c 2006-03-21 19:21:18.000000000 -0800 @@ -3482,13 +3482,15 @@ fail: if (!cachep->next.next) { /* Cache is not active yet. Roll back what we did */ node--; - while (node >= 0 && cachep->nodelists[node]) { - l3 = cachep->nodelists[node]; - - kfree(l3->shared); - free_alien_cache(l3->alien); - kfree(l3); - cachep->nodelists[node] = NULL; + while (node >= 0) { + if (cachep->nodelists[node]) { + l3 = cachep->nodelists[node]; + + kfree(l3->shared); + free_alien_cache(l3->alien); + kfree(l3); + cachep->nodelists[node] = NULL; + } node--; } }