X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mm%2Fslub.c;h=bdc9abb08a230f2724ad842a0bc4928da0e48d23;hb=abcea2c322cef559ef2f108b4763d107a5ccc37f;hp=f0e2892fe403e57c8b29dfde41d7abf6f3a6b1f6;hpb=5359c32eb7402124abc9964d5d53639fe0739cea;p=linux-2.6-omap-h63xx.git diff --git a/mm/slub.c b/mm/slub.c index f0e2892fe40..bdc9abb08a2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1996,7 +1996,7 @@ static struct kmem_cache_cpu *alloc_kmem_cache_cpu(struct kmem_cache *s, static void free_kmem_cache_cpu(struct kmem_cache_cpu *c, int cpu) { if (c < per_cpu(kmem_cache_cpu, cpu) || - c > per_cpu(kmem_cache_cpu, cpu) + NR_KMEM_CACHE_CPU) { + c >= per_cpu(kmem_cache_cpu, cpu) + NR_KMEM_CACHE_CPU) { kfree(c); return; } @@ -2254,7 +2254,7 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) * Add some empty padding so that we can catch * overwrites from earlier objects rather than let * tracking information or the free pointer be - * corrupted if an user writes before the start + * corrupted if a user writes before the start * of the object. */ size += sizeof(void *);