Linux Device Mapper development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Keith Busch <keith.busch@intel.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jun'ichi Nomura <j-nomura@ce.jp.nec.com>,
	dm-devel@redhat.com
Subject: Re: [PATCHv2 0/4] blk-mq support for dm multipath
Date: Sat, 6 Dec 2014 00:53:51 -0500	[thread overview]
Message-ID: <20141206055351.GA2110@redhat.com> (raw)
In-Reply-To: <20141205232542.GA1274@redhat.com>

On Fri, Dec 05 2014 at  6:25pm -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Tue, Oct 28 2014 at  2:26pm -0400,
> Mike Snitzer <snitzer@redhat.com> wrote:
> 
> > On Tue, Oct 28 2014 at  2:13pm -0400,
> > Keith Busch <keith.busch@intel.com> wrote:
> > 
> > > No comments this time. Did I totally botch this in the wrong direction,
> > > or was the timing bad with the linux con/plumbers that week?
> > 
> > I've just been busy with other things.  Reviewing this is on my
> > near-term TODO (for 3.19 merge consideration).
> 
> Hi Keith,
> 
> I've found a few issues with your v2.  I've been working through the
> code and fixing things as I see them.  Please see this branch:
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-for-3.19-blk-mq
> 
> My changes build on your v2 baseline.
> 
> How much testing have you done?  It could be that my changes screwed
> something up but... I just tried simply creating a normal request-based
> DM multipath device (using non blk-mq devices) and hit this crash:
> 
> [ 1179.088841] BUG: unable to handle kernel NULL pointer dereference at 0000000000000378
> [ 1179.097587] IP: [<ffffffff8142091a>] scsi_setup_cmnd+0xea/0x170

map_tio_request -> map_request -> dm_dispatch_request -> blk_insert_cloned_request ->
scsi_setup_cmnd -> scsi_setup_fs_cmnd -> scsi_cmd_to_driver

static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
{
        return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
}

We're crashing because rq_disk is NULL.
This fixed the crash for me:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-for-3.19-blk-mq&id=0373233d9a9ca72a90394ed1770b21a8b7431abc

But in general this code needs _a lot_ more testing/review.
Sadly I cannot stage it for 3.19 inclusion.

  parent reply	other threads:[~2014-12-06  5:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 23:46 [PATCHv2 0/4] blk-mq support for dm multipath Keith Busch
2014-10-17 23:46 ` [PATCHv2 1/4] dm: prep initialized requests Keith Busch
2014-10-17 23:46 ` [PATCHv2 2/4] dm: Submit stacked requests in irq enabled context Keith Busch
2014-10-17 23:46 ` [PATCHv2 3/4] dm: Move request allocation to dm_target type Keith Busch
2014-10-17 23:46 ` [PATCHv2 4/4] block: blk-mq support for cloned requests Keith Busch
2014-10-28 18:13 ` [PATCHv2 0/4] blk-mq support for dm multipath Keith Busch
2014-10-28 18:26   ` Mike Snitzer
2014-12-05 23:25     ` Mike Snitzer
2014-12-05 23:33       ` Keith Busch
2014-12-06  0:35         ` Mike Snitzer
2014-12-06  5:53       ` Mike Snitzer [this message]
2014-12-06  6:09         ` Mike Snitzer
2014-12-13  2:08           ` Mike Snitzer
2014-10-28 18:48   ` Hannes Reinecke

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=20141206055351.GA2110@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=keith.busch@intel.com \
    /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