From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by ug-out-1314.google.com with SMTP id 34so702591ugf.19 for ; Wed, 29 Oct 2008 14:18:11 -0700 (PDT) Message-ID: <4908D30F.1020206@gmail.com> Date: Wed, 29 Oct 2008 17:18:07 -0400 From: roel kluin MIME-Version: 1.0 Subject: [PATCH] slab: unsigned slabp->inuse cannot be less than 0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: penberg@cs.helsinki.fi, linux-mm@kvack.org List-ID: unsigned slabp->inuse cannot be less than 0 Signed-off-by: Roel Kluin --- 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: email@kvack.org