Re: [RFC] [PATCH] cpuset operations causes Badness at mm/slab.c:777 warning

Linus Torvalds
2007-06-01T23:42:33Z

On Fri, 1 Jun 2007, Christoph Lameter wrote:
>
> Something like this? (Not tested yet just for review):

I'm not seeing the path on the freeing side that silently accepts BADPTR.

It is not ok to derefence BADPTR, but it's obviously ok to _free_ it.

Also, if I read the patch correctly, you _also_ return BADPTR for slabs
that are too large. No? That would be wrong - those need to return NULL
for "out of memory".

(But I only looked at the diff, not at the end result, so it may be that
all the cases where you changed "return NULL" into "return BADPTR" were
really just the size-zero ones - it just looked suspicious).

Linus