* [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs
@ 2020-08-13 16:51 Li Qiang
2020-08-17 12:17 ` Pankaj Gupta
2020-08-28 1:21 ` Li Qiang
0 siblings, 2 replies; 5+ messages in thread
From: Li Qiang @ 2020-08-13 16:51 UTC (permalink / raw)
To: mst; +Cc: Li Qiang, liq3ea, qemu-devel
If error occurs while processing the virtio request we should call
'virtqueue_detach_element' to detach the element from the virtqueue
before free the elem.
Signed-off-by: Li Qiang <liq3ea@163.com>
---
hw/virtio/virtio-pmem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
index 1e0c137497..ddb0125901 100644
--- a/hw/virtio/virtio-pmem.c
+++ b/hw/virtio/virtio-pmem.c
@@ -77,6 +77,7 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
if (req_data->elem.out_num < 1 || req_data->elem.in_num < 1) {
virtio_error(vdev, "virtio-pmem request not proper");
+ virtqueue_detach_element(vq, (VirtQueueElement *)req_data, 0);
g_free(req_data);
return;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs
2020-08-13 16:51 [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs Li Qiang
@ 2020-08-17 12:17 ` Pankaj Gupta
2020-08-28 1:21 ` Li Qiang
1 sibling, 0 replies; 5+ messages in thread
From: Pankaj Gupta @ 2020-08-17 12:17 UTC (permalink / raw)
To: Li Qiang; +Cc: liq3ea, qemu-devel, Michael S . Tsirkin
> If error occurs while processing the virtio request we should call
> 'virtqueue_detach_element' to detach the element from the virtqueue
> before free the elem.
>
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
> hw/virtio/virtio-pmem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
> index 1e0c137497..ddb0125901 100644
> --- a/hw/virtio/virtio-pmem.c
> +++ b/hw/virtio/virtio-pmem.c
> @@ -77,6 +77,7 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
>
> if (req_data->elem.out_num < 1 || req_data->elem.in_num < 1) {
> virtio_error(vdev, "virtio-pmem request not proper");
> + virtqueue_detach_element(vq, (VirtQueueElement *)req_data, 0);
> g_free(req_data);
> return;
> }
> --
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs
2020-08-13 16:51 [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs Li Qiang
2020-08-17 12:17 ` Pankaj Gupta
@ 2020-08-28 1:21 ` Li Qiang
2020-09-07 1:37 ` Li Qiang
1 sibling, 1 reply; 5+ messages in thread
From: Li Qiang @ 2020-08-28 1:21 UTC (permalink / raw)
To: Li Qiang; +Cc: Qemu Developers, Michael S. Tsirkin
Kindly ping.
Li Qiang <liq3ea@163.com> 于2020年8月14日周五 上午12:52写道:
>
> If error occurs while processing the virtio request we should call
> 'virtqueue_detach_element' to detach the element from the virtqueue
> before free the elem.
>
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
> hw/virtio/virtio-pmem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
> index 1e0c137497..ddb0125901 100644
> --- a/hw/virtio/virtio-pmem.c
> +++ b/hw/virtio/virtio-pmem.c
> @@ -77,6 +77,7 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
>
> if (req_data->elem.out_num < 1 || req_data->elem.in_num < 1) {
> virtio_error(vdev, "virtio-pmem request not proper");
> + virtqueue_detach_element(vq, (VirtQueueElement *)req_data, 0);
> g_free(req_data);
> return;
> }
> --
> 2.17.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs
2020-08-28 1:21 ` Li Qiang
@ 2020-09-07 1:37 ` Li Qiang
2020-09-10 8:45 ` Pankaj Gupta
0 siblings, 1 reply; 5+ messages in thread
From: Li Qiang @ 2020-09-07 1:37 UTC (permalink / raw)
To: Li Qiang; +Cc: Qemu Developers, Michael S. Tsirkin
ping!
Li Qiang <liq3ea@gmail.com> 于2020年8月28日周五 上午9:21写道:
>
> Kindly ping.
>
> Li Qiang <liq3ea@163.com> 于2020年8月14日周五 上午12:52写道:
> >
> > If error occurs while processing the virtio request we should call
> > 'virtqueue_detach_element' to detach the element from the virtqueue
> > before free the elem.
> >
> > Signed-off-by: Li Qiang <liq3ea@163.com>
> > ---
> > hw/virtio/virtio-pmem.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
> > index 1e0c137497..ddb0125901 100644
> > --- a/hw/virtio/virtio-pmem.c
> > +++ b/hw/virtio/virtio-pmem.c
> > @@ -77,6 +77,7 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
> >
> > if (req_data->elem.out_num < 1 || req_data->elem.in_num < 1) {
> > virtio_error(vdev, "virtio-pmem request not proper");
> > + virtqueue_detach_element(vq, (VirtQueueElement *)req_data, 0);
> > g_free(req_data);
> > return;
> > }
> > --
> > 2.17.1
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs
2020-09-07 1:37 ` Li Qiang
@ 2020-09-10 8:45 ` Pankaj Gupta
0 siblings, 0 replies; 5+ messages in thread
From: Pankaj Gupta @ 2020-09-10 8:45 UTC (permalink / raw)
To: Li Qiang; +Cc: Li Qiang, Qemu Developers, Michael S. Tsirkin
Hi Michael,
Please add while applying the patch.
fixes: 5f503cd9f3 ("virtio-pmem: add virtio device")
On Mon, 7 Sep 2020 at 03:38, Li Qiang <liq3ea@gmail.com> wrote:
>
> ping!
>
> Li Qiang <liq3ea@gmail.com> 于2020年8月28日周五 上午9:21写道:
> >
> > Kindly ping.
> >
> > Li Qiang <liq3ea@163.com> 于2020年8月14日周五 上午12:52写道:
> > >
> > > If error occurs while processing the virtio request we should call
> > > 'virtqueue_detach_element' to detach the element from the virtqueue
> > > before free the elem.
> > >
> > > Signed-off-by: Li Qiang <liq3ea@163.com>
> > > ---
> > > hw/virtio/virtio-pmem.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
> > > index 1e0c137497..ddb0125901 100644
> > > --- a/hw/virtio/virtio-pmem.c
> > > +++ b/hw/virtio/virtio-pmem.c
> > > @@ -77,6 +77,7 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq)
> > >
> > > if (req_data->elem.out_num < 1 || req_data->elem.in_num < 1) {
> > > virtio_error(vdev, "virtio-pmem request not proper");
> > > + virtqueue_detach_element(vq, (VirtQueueElement *)req_data, 0);
> > > g_free(req_data);
> > > return;
> > > }
> > > --
> > > 2.17.1
> > >
> > >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-10 8:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 16:51 [PATCH] hw: virtio-pmem: detach the element fromt the virtqueue when error occurs Li Qiang
2020-08-17 12:17 ` Pankaj Gupta
2020-08-28 1:21 ` Li Qiang
2020-09-07 1:37 ` Li Qiang
2020-09-10 8:45 ` Pankaj Gupta
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.