From: roel kluin <roel.kluin@gmail.com>
To: penberg@cs.helsinki.fi, linux-mm@kvack.org
Subject: [PATCH] slab: unsigned slabp->inuse cannot be less than 0
Date: Wed, 29 Oct 2008 17:18:07 -0400 [thread overview]
Message-ID: <4908D30F.1020206@gmail.com> (raw)
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>
next reply other threads:[~2008-10-29 21:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 21:18 roel kluin [this message]
2008-10-30 18:23 ` Pekka Enberg
2008-10-30 18:51 ` Christoph Lameter
2008-10-31 8:54 ` Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4908D30F.1020206@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox