[PATCH] slab: fix typo in allocation failure handling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Akinobu Mita
Date: Wednesday, November 7, 2007 - 7:39 am

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;
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] slab: fix typo in allocation failure handling, Akinobu Mita, (Wed Nov 7, 7:39 am)
Re: [PATCH] slab: fix typo in allocation failure handling, Christoph Lameter, (Wed Nov 7, 11:07 am)