Messages in this thread | | | Date | Fri, 1 Jun 2007 15:16:49 -0700 | From | Andrew Morton <> | Subject | Re: [RFC] [PATCH] cpuset operations causes Badness at mm/slab.c:777 warning |
| |
On Fri, 1 Jun 2007 14:45:27 -0700 (PDT) Christoph Lameter <clameter@sgi.com> wrote:
> On Fri, 1 Jun 2007, Andrew Morton wrote: > > > Poisoning and redzoning could have caught that. > > Redzoning would not have caught it. This was a kmalloc allocation and > SLAB always gave them 32 bytes to play with. Only writes more than 32 > bytes behind would have been caught. > > Poisoning is only applicable to unallocated objects and these were > allocated.
Nope and nope.
This is a special case where the user asked for zero bytes and the kernel gave him 8 (or 32) bytes instead.
If slab was smart enough, it would have poisoned those 8 bytes to some known pattern, and then checked that they still had that pattern when the memory got freed again.
But it isn't smart enough, so the bug went undetected.
As I said, it's specific to the kmalloc(0) problem, and we're fixing that by other means 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/
| |