Re: kmemcheck caught read from freed memory (cfq_free_io_context)

From: Jens Axboe
Date: Wed Apr 02 2008 - 08:28:29 EST


On Wed, Apr 02 2008, Peter Zijlstra wrote:
> On Wed, 2008-04-02 at 13:53 +0200, Jens Axboe wrote:
>
> > > Yeah, SLAB_DESTROY_BY_RCU should have a _HUGE_ comment explaining it,
> > > I'm sure this is not the first (nor the last) time people get that
> > > wrong.
> >
> > It should, SLAB_DESTROY_BY_RCU is definitely useful, but it is expected
> > to be an 'easier' way of doing the call_rcu() manually. So it definitely
> > needs more documentation.
> >
>
> Ok I gave it a go, how bad is this text?

I think it looks good. The key point is this:

"This delays freeing the SLAB page by a grace period, it does _NOT_ delay
object freeing."

which is right in the front of the text and with sample validation
below. So you can add my acked-by to that, if you want.

--
Jens Axboe

--
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/