Re: 9pfs double kfree

From: Balbir Singh
Date: Mon Mar 06 2006 - 02:37:34 EST


> The vast majority of people never run with slab poisoning enabled
> judging by the number of bugs it constantly turns up.
>

Agreed, maybe we could insist that developers enable these options and
test their patch with debugging enabled before posting them, but I
have a feeling that it would meet a lot of resistance :-). Doesn't
hurt to document it in Documentation/HOWTO or somewhere more
appropriate.

> > kfree() will ignore NULL
> > pointer, from the comments in kfree
>
> *nod*, poisoning the ptr would be a better idea.
>

Yes, I think this is a better idea.

> > May we could have such a variant under CONFIG_DEBUG_SLAB if we needed
> > and also change the variant kfree to BUG_ON() a NULL pointer.
>
> given the cost is just a ptr assignment in a slow path, I'd prefer
> it was non-optional, otherwise it'll be as underused as the other
> debugging options.
>

Yes, agreed.
-
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/