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

From: Linus Torvalds
Date: Fri Jun 01 2007 - 19:42:34 EST




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/