From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
stable@vger.kernel.org
Subject: [PATCH 1/3] xen/blkback: Don't trust the handle from the frontend.
Date: Fri, 25 Jan 2013 12:32:30 -0500 [thread overview]
Message-ID: <1359135152-30688-2-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1359135152-30688-1-git-send-email-konrad.wilk@oracle.com>
The 'handle' is the device that the request is from. For the life-time
of the ring we copy it from a request to a response so that the frontend
is not surprised by it. But we do not need it - when we start processing
I/Os we have our own 'struct phys_req' which has only most essential
information about the request. In fact the 'vbd_translate' ends up
over-writing the preq.dev with a value from the backend.
This assignment of preq.dev with the 'handle' value is superfluous
so lets not do it.
Cc: stable@vger.kernel.org
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/block/xen-blkback/blkback.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 742871d..2de3da9 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -890,7 +890,6 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
goto fail_response;
}
- preq.dev = req->u.rw.handle;
preq.sector_number = req->u.rw.sector_number;
preq.nr_sects = 0;
--
1.8.0.2
next prev parent reply other threads:[~2013-01-25 17:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 17:32 [PATCH] block backend fixes for v3.8 (and stable) v1 Konrad Rzeszutek Wilk
2013-01-25 17:32 ` Konrad Rzeszutek Wilk [this message]
2013-01-28 11:09 ` [PATCH 1/3] xen/blkback: Don't trust the handle from the frontend Jan Beulich
2013-01-25 17:32 ` [PATCH 2/3] xen/ring: Add a new macro to detect whether there is an overflow in requests and response Konrad Rzeszutek Wilk
2013-01-25 17:45 ` Roger Pau Monné
2013-01-25 18:29 ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-01-25 18:41 ` Konrad Rzeszutek Wilk
2013-01-25 18:41 ` Konrad Rzeszutek Wilk
2013-01-25 17:32 ` [PATCH 3/3] xen/blkback: Check for insane amounts of request on the ring Konrad Rzeszutek Wilk
2013-01-25 18:43 ` Konrad Rzeszutek Wilk
2013-01-28 11:07 ` Jan Beulich
2013-01-28 11:38 ` [Xen-devel] " David Vrabel
2013-01-28 15:44 ` Konrad Rzeszutek Wilk
2013-01-28 16:03 ` David Vrabel
2013-01-28 16:13 ` Konrad Rzeszutek Wilk
[not found] ` <51066A1202000078000BA020@nat28.tlf.novell.com>
2013-01-28 15:42 ` Konrad Rzeszutek Wilk
[not found] ` <20130128154231.GF4838@konrad-lan.dumpdata.com>
2013-01-28 16:18 ` Jan Beulich
[not found] ` <5106B30302000078000BA2A2@nat28.tlf.novell.com>
2013-01-28 16:47 ` Konrad Rzeszutek Wilk
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=1359135152-30688-2-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).