[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190408161259.7f1a0369@oc2783563651>
Date: Mon, 8 Apr 2019 16:12:59 +0200
From: Halil Pasic <pasic@...ux.ibm.com>
To: Cornelia Huck <cohuck@...hat.com>
Cc: "Michael S . Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] virtio: Honour 'may_reduce_num' in
vring_create_virtqueue
On Mon, 8 Apr 2019 14:33:22 +0200
Cornelia Huck <cohuck@...hat.com> wrote:
> vring_create_virtqueue() allows the caller to specify via the
> may_reduce_num parameter whether the vring code is allowed to
> allocate a smaller ring than specified.
>
> However, the split ring allocation code tries to allocate a
> smaller ring on allocation failure regardless of what the
> caller specified. This may cause trouble for e.g. virtio-pci
> in legacy mode, which does not support ring resizing. (The
> packed ring code does not resize in any case.)
>
> Let's fix this by bailing out immediately in the split ring code
> if the requested size cannot be allocated and may_reduce_num has
> not been specified.
>
> While at it, fix a typo in the usage instructions.
>
> Fixes: 2a2d1382fe9d ("virtio: Add improved queue allocation API")
> Cc: stable@...r.kernel.org # v4.6+
> Signed-off-by: Cornelia Huck <cohuck@...hat.com>
Reviewed-by: Halil Pasic <pasic@...ux.ibm.com>
Powered by blists - more mailing lists