From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
Konrad Rzeszutek Wilk <konrad@kernel.org>,
stable@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH 3/3] xen/blkback: Check for insane amounts of request on the ring.
Date: Mon, 28 Jan 2013 10:44:50 -0500 [thread overview]
Message-ID: <20130128154450.GG4838@konrad-lan.dumpdata.com> (raw)
In-Reply-To: <5106634A.2000308@citrix.com>
On Mon, Jan 28, 2013 at 11:38:50AM +0000, David Vrabel wrote:
> On 25/01/13 18:43, Konrad Rzeszutek Wilk wrote:
> >
> > Check that the ring does not have an insane amount of requests
> > (more than there could fit on the ring).
> [...]
> > --- a/drivers/block/xen-blkback/blkback.c
> > +++ b/drivers/block/xen-blkback/blkback.c
> [...]
> > @@ -415,8 +415,12 @@ int xen_blkif_schedule(void *arg)
> > blkif->waiting_reqs = 0;
> > smp_mb(); /* clear flag *before* checking for work */
> >
> > - if (do_block_io_op(blkif))
> > + rc = do_block_io_op(blkif);
> > + if (rc > 0)
> > blkif->waiting_reqs = 1;
> > + if (rc == -EACCES)
> > + wait_event_interruptible(blkif->shutdown_wq,
> > + kthread_should_stop());
>
> So if this happens then the backend silently stops processing any
> further requests? I think it should print an error and disconnect from
> the front end.
I was not sure what it should print?
"Frontend provided bogus ring requests. Halting ring processing"?
It does eventually disconnect from the front-end as the XenBus enters
the Disconnect phase. It seemed the strike the balance - so that if
the frontend negotiates again the ring can start again and penalize
the frontend for giving bogus data.
>
> David
next prev parent reply other threads:[~2013-01-28 15:45 UTC|newest]
Thread overview: 29+ 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 ` [PATCH 1/3] xen/blkback: Don't trust the handle from the frontend Konrad Rzeszutek Wilk
2013-01-28 11:09 ` Jan Beulich
2013-01-28 11:09 ` [Xen-devel] " 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 ` [Xen-devel] " Roger Pau Monné
2013-01-25 17:45 ` Roger Pau Monné
2013-01-25 18:29 ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-01-25 18:29 ` Konrad Rzeszutek Wilk
2013-01-25 18:41 ` Konrad Rzeszutek Wilk
2013-01-25 18:41 ` 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:07 ` [Xen-devel] " Jan Beulich
2013-01-28 15:42 ` Konrad Rzeszutek Wilk
2013-01-28 15:42 ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-01-28 16:18 ` Jan Beulich
2013-01-28 16:18 ` [Xen-devel] " Jan Beulich
2013-01-28 16:47 ` Konrad Rzeszutek Wilk
2013-01-28 16:47 ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-01-28 11:38 ` David Vrabel
2013-01-28 11:38 ` David Vrabel
2013-01-28 15:44 ` Konrad Rzeszutek Wilk [this message]
2013-01-28 16:03 ` David Vrabel
2013-01-28 16:03 ` David Vrabel
2013-01-28 16:13 ` 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=20130128154450.GG4838@konrad-lan.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=david.vrabel@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.