Re: [PATCH] blk-mq: fix hctx/ctx kobject use-after-free

2015-01-20 Thread Jens Axboe
On 01/19/2015 08:00 PM, Ming Lei wrote: The kobject memory shouldn't have been freed before the kobject is released because driver core can access it freely before its release. This patch frees hctx in its release callback. For ctx, they share one single per-cpu variable which is associated with

[PATCH] blk-mq: fix hctx/ctx kobject use-after-free

2015-01-19 Thread Ming Lei
The kobject memory shouldn't have been freed before the kobject is released because driver core can access it freely before its release. This patch frees hctx in its release callback. For ctx, they share one single per-cpu variable which is associated with the request queue, so free ctx in q->mq_k