From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Dongli Zhang <dongli.zhang@oracle.com>
Cc: <axboe@kernel.dk>, <konrad.wilk@oracle.com>,
<linux-kernel@vger.kernel.org>, <linux-block@vger.kernel.org>,
<paul.durrant@citrix.com>, <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront
Date: Tue, 18 Dec 2018 10:47:54 +0100 [thread overview]
Message-ID: <20181218094754.dcja5rr7qlprscmp@mac> (raw)
In-Reply-To: <20181218093300.qfslnloxooqnu2im@mac>
On Tue, Dec 18, 2018 at 10:33:00AM +0100, Roger Pau Monné wrote:
> On Tue, Dec 18, 2018 at 08:55:38AM +0800, Dongli Zhang wrote:
> > + for (i = 0; i < nr_grefs; i++) {
> > + char ring_ref_name[RINGREF_NAME_LEN];
> > +
> > + snprintf(ring_ref_name, RINGREF_NAME_LEN, "ring-ref%u", i);
> > + err = xenbus_scanf(XBT_NIL, dir, ring_ref_name,
> > + "%u", &ring_ref[i]);
> > +
> > + if (err != 1 && (i || (!i && nr_grefs > 1))) {
>
> AFAICT the above condition can be simplified as "err != 1 &&
> nr_grefs".
Sorry, this should be "err != 1 && nr_grefs > 1", since it's not order
but rather the number of grefs.
Roger.
next prev parent reply other threads:[~2018-12-18 9:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 0:55 [PATCH v2 1/1] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront Dongli Zhang
2018-12-18 9:33 ` Roger Pau Monné
2018-12-18 9:47 ` Roger Pau Monné [this message]
2018-12-18 11:31 ` [Xen-devel] " Dongli Zhang
2018-12-18 15:13 ` Roger Pau Monné
2018-12-18 15:29 ` Dongli Zhang
2018-12-19 9:09 ` Roger Pau Monné
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=20181218094754.dcja5rr7qlprscmp@mac \
--to=roger.pau@citrix.com \
--cc=axboe@kernel.dk \
--cc=dongli.zhang@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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).