Re: [PATCH] blk-mq: clear q->mq_ops if init fail

2016-05-26 Thread Jens Axboe
On 05/26/2016 12:23 AM, Ming Lin wrote: From: Ming Lin blk_mq_init_queue() calls blk_mq_init_allocated_queue(), but q->mq_ops was not cleared when blk_mq_init_allocated_queue() fails. Then blk_cleanup_queue() calls blk_mq_free_queue() which will crash because: - q->all_q_node is not added to al

Re: [PATCH] blk-mq: clear q->mq_ops if init fail

2016-05-26 Thread Christoph Hellwig
On Wed, May 25, 2016 at 11:23:27PM -0700, Ming Lin wrote: > From: Ming Lin > > blk_mq_init_queue() calls blk_mq_init_allocated_queue(), but q->mq_ops > was not cleared when blk_mq_init_allocated_queue() fails. > Then blk_cleanup_queue() calls blk_mq_free_queue() which will crash because: > - q->a

[PATCH] blk-mq: clear q->mq_ops if init fail

2016-05-25 Thread Ming Lin
From: Ming Lin blk_mq_init_queue() calls blk_mq_init_allocated_queue(), but q->mq_ops was not cleared when blk_mq_init_allocated_queue() fails. Then blk_cleanup_queue() calls blk_mq_free_queue() which will crash because: - q->all_q_node is not added to all_q_list yet - q->tag_set is NULL - hctx w