Hi Guys,

Dongsu Park reported[1] that kernel oops can be triggered easily by
CPU plug when there is pending I/O on virtio-scsi.

Turns out two problems exist in blk-mq core code and both can trigger
oops by CPU plug:
        - timeout handling vs CPU hotplug, especially unmapped hw queue tags
        is still touched by timeout handler
        - in case of shared tags, there is one bug about setting and checking
        hctx->tags during CPU hotplug

The two patches fix the two problem, and Dongsu has verified that
the oops is fixed with the two patches too.

[1], http://marc.info/?t=142926389200008&r=1&w=2

V1:
        - update comment
        - moving tags allocation in blk_mq_map_swqueue() because
        unmapped hw queue can be remapped after CPU topo is changed

 block/blk-mq.c |   50 ++++++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 24 deletions(-)


Thanks,
Ming Lei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to