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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 25, 2016 at 11:23:27PM -0700, Ming Lin wrote:
> From: Ming Lin <ming.l@xxxxxxxxxxx>
> 
> 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 was not setup yet or already freed
> 
> Fixed it by clearing q->mq_ops on error path.

Looks fine,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux