linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slab: unsigned slabp->inuse cannot be less than 0
@ 2008-10-29 21:18 roel kluin
  2008-10-30 18:23 ` Pekka Enberg
  0 siblings, 1 reply; 4+ messages in thread
From: roel kluin @ 2008-10-29 21:18 UTC (permalink / raw)
  To: penberg, linux-mm

unsigned slabp->inuse cannot be less than 0

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
N.B. It could be possible that a different check is needed.
I may not be able to respond for a few weeks.

diff --git a/mm/slab.c b/mm/slab.c
index 0918751..f634a87 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2997,7 +2997,7 @@ retry:
 		 * there must be at least one object available for
 		 * allocation.
 		 */
-		BUG_ON(slabp->inuse < 0 || slabp->inuse >= cachep->num);
+		BUG_ON(slabp->inuse >= cachep->num);
 
 		while (slabp->inuse < cachep->num && batchcount--) {
 			STATS_INC_ALLOCED(cachep);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-31  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29 21:18 [PATCH] slab: unsigned slabp->inuse cannot be less than 0 roel kluin
2008-10-30 18:23 ` Pekka Enberg
2008-10-30 18:51   ` Christoph Lameter
2008-10-31  8:54     ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox