search for: init_vq

Displaying 20 results from an estimated 652 matches for "init_vq".

Did you mean: init_vr
2016 Jun 27
2
[PATCH] virtio: Return correct errno for function init_vq's failure
The error number -ENOENT or 0 will be returned, if we can not allocate more memory in function init_vq. If host can support multiple virtual queues, and we fails to allocate necessary memory structures for vq, kernel may crash due to incorrect returning. To fix it, kernel will return correct value in init_vq. Signed-off-by: Minfei Huang <mnghuan at gmail.com> Signed-off-by: Minfei Huang <...
2016 Jun 27
2
[PATCH] virtio: Return correct errno for function init_vq's failure
The error number -ENOENT or 0 will be returned, if we can not allocate more memory in function init_vq. If host can support multiple virtual queues, and we fails to allocate necessary memory structures for vq, kernel may crash due to incorrect returning. To fix it, kernel will return correct value in init_vq. Signed-off-by: Minfei Huang <mnghuan at gmail.com> Signed-off-by: Minfei Huang <...
2014 Jan 25
3
[PATCH] virtio_balloon: don't call virtio_has_feature() twice on init_vqs()
Cchange init_vqs() to avoid calling twice the virtio_has_feature() - attempting to find out if VIRTIO_BALLOON_F_STATS_VQ feature was negotiated - consequently we prevent unnecessarily running the drivers' feature_table more than needed. Signed-off-by: Leandro Dorileo <l at dorileo.org> --- drivers/virt...
2014 Jan 25
3
[PATCH] virtio_balloon: don't call virtio_has_feature() twice on init_vqs()
Cchange init_vqs() to avoid calling twice the virtio_has_feature() - attempting to find out if VIRTIO_BALLOON_F_STATS_VQ feature was negotiated - consequently we prevent unnecessarily running the drivers' feature_table more than needed. Signed-off-by: Leandro Dorileo <l at dorileo.org> --- drivers/virt...
2016 Jul 13
1
[PATCH] virtio: Return correct errno for function init_vq's failure
On 07/06/16 at 11:18P, Cornelia Huck wrote: > On Mon, 27 Jun 2016 10:09:18 +0800 > Minfei Huang <mnghuan at gmail.com> wrote: > > > The error number -ENOENT or 0 will be returned, if we can not allocate > > more memory in function init_vq. If host can support multiple virtual > > queues, and we fails to allocate necessary memory structures for vq, > > kernel may crash due to incorrect returning. > > > > To fix it, kernel will return correct value in init_vq. > The error handling in this function looks hor...
2016 Jul 13
1
[PATCH] virtio: Return correct errno for function init_vq's failure
On 07/06/16 at 11:18P, Cornelia Huck wrote: > On Mon, 27 Jun 2016 10:09:18 +0800 > Minfei Huang <mnghuan at gmail.com> wrote: > > > The error number -ENOENT or 0 will be returned, if we can not allocate > > more memory in function init_vq. If host can support multiple virtual > > queues, and we fails to allocate necessary memory structures for vq, > > kernel may crash due to incorrect returning. > > > > To fix it, kernel will return correct value in init_vq. > The error handling in this function looks hor...
2016 Jul 06
0
[PATCH] virtio: Return correct errno for function init_vq's failure
On Mon, 27 Jun 2016 10:09:18 +0800 Minfei Huang <mnghuan at gmail.com> wrote: > The error number -ENOENT or 0 will be returned, if we can not allocate > more memory in function init_vq. If host can support multiple virtual > queues, and we fails to allocate necessary memory structures for vq, > kernel may crash due to incorrect returning. > > To fix it, kernel will return correct value in init_vq. > > Signed-off-by: Minfei Huang <mnghuan at gmail.com> &g...
2014 Jan 28
0
[PATCH] virtio_balloon: don't call virtio_has_feature() twice on init_vqs()
Leandro Dorileo <l at dorileo.org> writes: > Cchange init_vqs() to avoid calling twice the virtio_has_feature() > - attempting to find out if VIRTIO_BALLOON_F_STATS_VQ feature was negotiated - > consequently we prevent unnecessarily running the drivers' feature_table more > than needed. > > Signed-off-by: Leandro Dorileo <l at dorileo.o...
2017 Mar 22
2
[PATCH] virtio_balloon: don't push uninitialized buffers to stats virtqueue
When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch initializes all tags with U16_MAX which is guaranteed to be ignored by the ho...
2017 Mar 22
2
[PATCH] virtio_balloon: don't push uninitialized buffers to stats virtqueue
When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch initializes all tags with U16_MAX which is guaranteed to be ignored by the ho...
2016 Jul 18
2
[PATCH v2] virtio_blk: Fix a slient kernel panic
We do a lot of memory allocation in function init_vq, and don't handle the allocation failure properly. Then this function will return 0, although initialization fails due to lacking memory. At that moment, kernel will panic in guest machine, if virtio is used to drive disk. To fix this bug, we should take care of allocation failure, and return...
2016 Jul 18
2
[PATCH v2] virtio_blk: Fix a slient kernel panic
We do a lot of memory allocation in function init_vq, and don't handle the allocation failure properly. Then this function will return 0, although initialization fails due to lacking memory. At that moment, kernel will panic in guest machine, if virtio is used to drive disk. To fix this bug, we should take care of allocation failure, and return...
2017 Mar 23
1
[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue
When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. An assertion is also add...
2017 Mar 23
1
[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue
When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. An assertion is also add...
2016 Oct 03
0
[PATCH 3/4] virtio_blk: Delete an unnecessary initialisation in init_vq()
...> > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index d28dbcf..696f452 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -376,7 +376,7 @@ static void virtblk_config_changed(struct virtio_device *vdev) > > static int init_vq(struct virtio_blk *vblk) > { > - int err = 0; > + int err; > int i; > vq_callback_t **callbacks; > const char **names; Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>
2016 Oct 03
0
[PATCH 3/4] virtio_blk: Delete an unnecessary initialisation in init_vq()
...> > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index d28dbcf..696f452 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -376,7 +376,7 @@ static void virtblk_config_changed(struct virtio_device *vdev) > > static int init_vq(struct virtio_blk *vblk) > { > - int err = 0; > + int err; > int i; > vq_callback_t **callbacks; > const char **names; Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com>
2017 Mar 22
2
[PATCH] virtio_balloon: don't push uninitialized buffers to stats virtqueue
On Wed, Mar 22, 2017 at 5:14 PM, Michael S. Tsirkin <mst at redhat.com> wrote: > On Wed, Mar 22, 2017 at 04:10:27PM +0100, Ladi Prosek wrote: >> When init_vqs runs, virtio_balloon.stats is either uninitialized or >> contains stale values. The host updates its state with garbage data >> because it has no way of knowing that this is just a marker buffer >> used for signaling. >> >> This patch initializes all tags with U16_MAX...
2017 Mar 22
2
[PATCH] virtio_balloon: don't push uninitialized buffers to stats virtqueue
On Wed, Mar 22, 2017 at 5:14 PM, Michael S. Tsirkin <mst at redhat.com> wrote: > On Wed, Mar 22, 2017 at 04:10:27PM +0100, Ladi Prosek wrote: >> When init_vqs runs, virtio_balloon.stats is either uninitialized or >> contains stale values. The host updates its state with garbage data >> because it has no way of knowing that this is just a marker buffer >> used for signaling. >> >> This patch initializes all tags with U16_MAX...
2016 Jul 19
4
[PATCH v3] virtio_blk: Fix a slient kernel panic
From: Minfei Huang <mnghuan at gmail.com> We do a lot of memory allocation in function init_vq, and don't handle the allocation failure properly. Then this function will return 0, although initialization fails due to lacking memory. At that moment, kernel will panic in guest machine, if virtio is used to drive disk. To fix this bug, we should take care of allocation failure, and return...
2016 Jul 19
4
[PATCH v3] virtio_blk: Fix a slient kernel panic
From: Minfei Huang <mnghuan at gmail.com> We do a lot of memory allocation in function init_vq, and don't handle the allocation failure properly. Then this function will return 0, although initialization fails due to lacking memory. At that moment, kernel will panic in guest machine, if virtio is used to drive disk. To fix this bug, we should take care of allocation failure, and return...