From: Dave Wysochanski <dwysocha@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: linux-scsi@vger.kernel.org, Mike Snitzer <snitzer@redhat.com>,
James Bottomley <jbottomley@parallels.com>
Subject: Re: [dm-devel] [PATCH] dm-mpath: Clear map_context pointer when requeuing
Date: Mon, 05 Dec 2011 09:15:03 -0500 [thread overview]
Message-ID: <1323094503.2159.9.camel@f14-work> (raw)
In-Reply-To: <1322663118-53387-1-git-send-email-hare@suse.de>
On Wed, 2011-11-30 at 15:25 +0100, Hannes Reinecke wrote:
> When requeing a request we should be clearing the map_context
> pointer, otherwise we might access an invalid memory location.
>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
> drivers/md/dm-mpath.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index 5e0090e..e6fad46 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -920,8 +920,10 @@ static int multipath_map(struct dm_target *ti, struct request *clone,
> map_context->ptr = mpio;
> clone->cmd_flags |= REQ_FAILFAST_TRANSPORT;
> r = map_io(m, clone, mpio, 0);
> - if (r < 0 || r == DM_MAPIO_REQUEUE)
> + if (r < 0 || r == DM_MAPIO_REQUEUE) {
> mempool_free(mpio, m->mpio_pool);
> + map_context->ptr = NULL;
> + }
>
> return r;
> }
Ack.
prev parent reply other threads:[~2011-12-05 14:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 14:25 [PATCH] dm-mpath: Clear map_context pointer when requeuing Hannes Reinecke
2011-11-30 14:49 ` Mike Snitzer
2011-12-01 0:12 ` Jun'ichi Nomura
2011-12-02 16:19 ` Hannes Reinecke
2011-12-05 10:49 ` Jun'ichi Nomura
2011-12-05 16:23 ` Hannes Reinecke
2011-12-06 4:44 ` Jun'ichi Nomura
2012-03-19 15:00 ` [dm-devel] " Alasdair G Kergon
2011-12-05 14:15 ` Dave Wysochanski [this message]
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=1323094503.2159.9.camel@f14-work \
--to=dwysocha@redhat.com \
--cc=dm-devel@redhat.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=snitzer@redhat.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