lkml.org 
[lkml]   [2016]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] blk-mq: clear q->mq_ops if init fail
From
Date
On 05/26/2016 12:23 AM, Ming Lin wrote:
> From: Ming Lin <ming.l@samsung.com>
>
> 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.

Thanks Ming, applied for this series.

--
Jens Axboe

\
 
 \ /
  Last update: 2016-05-26 17:01    [W:0.036 / U:3.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site