mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Jens Axboe <axboe@fb.com>, linux-kernel@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	Maxim Patlasov <mpatlasov@parallels.com>
Subject: [PATCH v1 0/2] blk-mq: fix oops caused by CPU hotplug
Date: Tue, 21 Apr 2015 10:00:18 +0800	[thread overview]
Message-ID: <1429581620-27747-1-git-send-email-ming.lei@canonical.com> (raw)

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


             reply	other threads:[~2015-04-21  2:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  2:00 Ming Lei [this message]
2015-04-21  2:00 ` [PATCH v1 1/2] blk-mq: fix race between timeout and " Ming Lei
2015-04-21  2:00 ` [PATCH v1 2/2] blk-mq: fix CPU hotplug handling Ming Lei
2015-04-23 16:27 ` [PATCH v1 0/2] blk-mq: fix oops caused by CPU hotplug Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429581620-27747-1-git-send-email-ming.lei@canonical.com \
    --to=ming.lei@canonical.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatlasov@parallels.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®