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

* Re: [PATCH] slab: unsigned slabp->inuse cannot be less than 0
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Pekka Enberg @ 2008-10-30 18:23 UTC (permalink / raw)
  To: roel kluin; +Cc: linux-mm, cl

roel kluin wrote:
> unsigned slabp->inuse cannot be less than 0

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

> 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

* Re: [PATCH] slab: unsigned slabp->inuse cannot be less than 0
  2008-10-30 18:23 ` Pekka Enberg
@ 2008-10-30 18:51   ` Christoph Lameter
  2008-10-31  8:54     ` Pekka Enberg
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2008-10-30 18:51 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: roel kluin, linux-mm

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

Acked-by: Christoph Lameter <cl@linux-foundation.org>

On Thu, 30 Oct 2008, Pekka Enberg wrote:

> roel kluin wrote:
>> unsigned slabp->inuse cannot be less than 0
>
> Christoph, this is on my to-merge list but an ACK would be nice.
>
>> 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

* Re: [PATCH] slab: unsigned slabp->inuse cannot be less than 0
  2008-10-30 18:51   ` Christoph Lameter
@ 2008-10-31  8:54     ` Pekka Enberg
  0 siblings, 0 replies; 4+ messages in thread
From: Pekka Enberg @ 2008-10-31  8:54 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: roel kluin, linux-mm

On Thu, 2008-10-30 at 13:51 -0500, Christoph Lameter wrote:
> Ok here it is. But I think you are well capable of reviewing trivial 
> patches on your own.
> 
> Acked-by: Christoph Lameter <cl@linux-foundation.org>

Applied, thanks!

--
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