Messages in this thread Patch in this message | | | Date | Wed, 7 Nov 2007 23:39:49 +0900 | From | "Akinobu Mita" <> | Subject | [PATCH] slab: fix typo in allocation failure handling |
| |
This patch fixes wrong array index in allocation failure handling.
Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
--- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Index: 2.6-git/mm/slab.c =================================================================== --- 2.6-git.orig/mm/slab.c +++ 2.6-git/mm/slab.c @@ -1043,7 +1043,7 @@ static struct array_cache **alloc_alien_ } ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d); if (!ac_ptr[i]) { - for (i--; i <= 0; i--) + for (i--; i >= 0; i--) kfree(ac_ptr[i]); kfree(ac_ptr); return NULL; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |