Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-11 Thread konrad wilk
On 6/11/2013 3:42 AM, Jan Beulich wrote: On 10.06.13 at 18:43, Konrad Rzeszutek Wilk wrote: On Mon, Jun 10, 2013 at 04:52:35PM +0100, Jan Beulich wrote: On 07.06.13 at 22:11, Konrad Rzeszutek Wilk wrote: On Tue, Jun 04, 2013 at 03:57:06PM -0400, Konrad Rzeszutek Wilk wrote: + /* N.B.

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-11 Thread Jan Beulich
>>> On 10.06.13 at 18:43, Konrad Rzeszutek Wilk wrote: > On Mon, Jun 10, 2013 at 04:52:35PM +0100, Jan Beulich wrote: >> >>> On 07.06.13 at 22:11, Konrad Rzeszutek Wilk >> >>> wrote: >> > On Tue, Jun 04, 2013 at 03:57:06PM -0400, Konrad Rzeszutek Wilk wrote: >> >> + /* N.B. 'rp', not 'rc'. */ >>

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-10 Thread Konrad Rzeszutek Wilk
On Mon, Jun 10, 2013 at 04:52:35PM +0100, Jan Beulich wrote: > >>> On 07.06.13 at 22:11, Konrad Rzeszutek Wilk > >>> wrote: > > On Tue, Jun 04, 2013 at 03:57:06PM -0400, Konrad Rzeszutek Wilk wrote: > >> + /* N.B. 'rp', not 'rc'. */ > >> + if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rp))

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-10 Thread Jan Beulich
>>> On 07.06.13 at 22:11, Konrad Rzeszutek Wilk wrote: > On Tue, Jun 04, 2013 at 03:57:06PM -0400, Konrad Rzeszutek Wilk wrote: >> +/* N.B. 'rp', not 'rc'. */ >> +if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rp)) { >> +pr_warn(DRV_PFX "Frontend provided bogus ring request

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-07 Thread Konrad Rzeszutek Wilk
On Tue, Jun 04, 2013 at 03:57:06PM -0400, Konrad Rzeszutek Wilk wrote: > Check that the ring does not have an insane amount of requests > (more than there could fit on the ring). > > If we detect this case we will stop processing the requests > and wait until the XenBus disconnects the ring. > >

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-07 Thread Konrad Rzeszutek Wilk
On Thu, Jun 06, 2013 at 12:47:35PM +0100, Jan Beulich wrote: > >>> On 05.06.13 at 19:35, Konrad Rzeszutek Wilk > >>> wrote: > > @@ -230,6 +231,7 @@ static int xen_blkif_map(struct xen_blkif *blkif, > > unsigned long shared_page, > > static void xen_blkif_disconnect(struct xen_blkif *blkif) > >

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-06 Thread Jan Beulich
>>> On 05.06.13 at 19:35, Konrad Rzeszutek Wilk wrote: > @@ -230,6 +231,7 @@ static int xen_blkif_map(struct xen_blkif *blkif, > unsigned long shared_page, > static void xen_blkif_disconnect(struct xen_blkif *blkif) > { > if (blkif->xenblkd) { > + wake_up(&blkif->shutdown_wq);

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-05 Thread Jan Beulich
>>> On 05.06.13 at 19:35, Konrad Rzeszutek Wilk wrote: >> > Looking at the code, one would expect that the existing check >> >> The "expect ..." here doesn't really seem to have a proper >> termination later in the sentence (or I'm having problems parsing >> the whole construct), so if I didn't k

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-05 Thread Konrad Rzeszutek Wilk
zutek Wilk Date: Wed, 23 Jan 2013 16:54:32 -0500 Subject: [PATCH] xen/blkback: Check for insane amounts of request on the ring. Check that the ring does not have an insane amount of requests (more than there could fit on the ring). If we detect this case we will stop processing the requests and

Re: [PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-05 Thread Jan Beulich
>>> On 04.06.13 at 21:57, Konrad Rzeszutek Wilk wrote: > Check that the ring does not have an insane amount of requests > (more than there could fit on the ring). > > If we detect this case we will stop processing the requests > and wait until the XenBus disconnects the ring. > > Looking at the

[PATCH] xen/blkback: Check for insane amounts of request on the ring.

2013-06-05 Thread Konrad Rzeszutek Wilk
Check that the ring does not have an insane amount of requests (more than there could fit on the ring). If we detect this case we will stop processing the requests and wait until the XenBus disconnects the ring. Looking at the code, one would expect that the existing check RING_REQUEST_CONS_OVERF