[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



>>> On 25.01.13 at 19:43, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> @@ -764,6 +768,9 @@ __do_block_io_op(struct xen_blkif *blkif)
>       rp = blk_rings->common.sring->req_prod;
>       rmb(); /* Ensure we see queued requests up to 'rp'. */
>  
> +     if (RING_REQUEST_PROD_OVERFLOW(&blk_rings->common, rp, rc))
> +             return -EACCES;

Actually I wonder whether we need the new macro at all: It seems
to me that using RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rp)
here would achieve the same effect.

Jan

> +
>       while (rc != rp) {
>  
>               if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc))



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.