Skip to contentSkip to conversation

slab: unsigned slabp->inuse cannot be less than 0

PATCH Applied roel kluin 3 participants 4 messages Oct 29, 2008 – Oct 31, 2008 Memory management

lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 slab: unsigned slabp->inuse cannot be less than 0

unsigned slabp->inuse cannot be less than 0

---
N.B. It could be possible that a different check is needed. I may not be able to respond for a few weeks.

mm/slab.c +1 -1
index 0918751..f634a87 100644
@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 1 line · roel kluin

unsigned slabp->inuse cannot be less than 0

Christoph, this is on my to-merge list but an ACK would be nice.

Quoted 11 lines

---
N.B. It could be possible that a different check is needed. I may not be able to respond for a few weeks.

mm/slab.c +0 -0
index 0918751..f634a87 100644

mm/slab.c retry: · line 3003

Quoted 8 lines
mm/slab.c +1 -1
@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw

Ok here it is. But I think you are well capable of reviewing trivial patches on your own.

Quoted 10 lines · Pekka Enberg
Quoted 1 line · roel kluin

unsigned slabp->inuse cannot be less than 0

Christoph, this is on my to-merge list but an ACK would be nice.

Quoted 5 lines

---
N.B. It could be possible that a different check is needed. I may not be able to respond for a few weeks.

Quoted 15 lines

mm/slab.c retry: · line 3003

Quoted 13 lines
mm/slab.c +1 -1
index 0918751..f634a87 100644
@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>