lkml.org 
[lkml]   [2007]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH] cpuset operations causes Badness at mm/slab.c:777 warning
On Fri, 1 Jun 2007 13:47:23 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> On Fri, 1 Jun 2007, Jeremy Fitzhardinge wrote:
>
> > I think this is a good example of why having to special-case kmalloc(0)
> > is a bad idea. The original code was straightforward and, barring
> > silliness, should be completely correct with npids==0. This new code
> > does nothing other than make things more complex.
>
> Hehe we got you. The code is indexing the pidarray allocated with
> kmalloc(0). So it uncovered a latent bug. It only worked because SLAB gave
> him 32 bytes and it now only works because SLUB give him 8. That is enough
> to illegally index the first array element.
>

Poisoning and redzoning could have caught that.

But I guess it doesn't matter now, as this shortcoming is specific to
the zero-length allocations, and we're weeding those out anyway.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-01 23:03    [W:0.112 / U:0.368 seconds]
©2003-2011 Jasper Spaans. Advertise on this site