Messages in this thread | | | Date | Mon, 5 Mar 2012 09:45:09 -0800 | From | Tejun Heo <> | Subject | Re: [PATCHSET] mempool, percpu, blkcg: fix percpu stat allocation and remove stats_lock |
| |
Hello,
On Mon, Feb 27, 2012 at 09:40:45AM -0500, Vivek Goyal wrote: > So we call following. > > elevator_switch() > blkg_destroy_all() > update_root_blkg(); > > Here update_root_blkg() will free up the blkg->pd for cfq. > > And later we call. > > elevator_exit() > cfq_exit_queue() > cfq_put_async_queues() > cfq_put_queue() > blkg_put(cfqg_to_blkg(cfqg)); <------ trying to reach blkg through > already freed policy data. > > So we should not free up root group policy data till old elevator has > exited.
Yeah, this analysis seems correct. For some reason, I still can't reproduce it even with slab debugging turned on. I modified the free path to fill *pd with pattern w/o actually freeing it and now can see similar crashes. Will post fix soon.
Thanks a lot.
-- tejun
| |