search for: req_buf

Displaying 20 results from an estimated 67 matches for "req_buf".

2019 May 07
3
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
On 4/25/19 10:00 PM, Pankaj Gupta wrote: > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpm...
2019 May 07
3
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
On 4/25/19 10:00 PM, Pankaj Gupta wrote: > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpm...
2019 May 17
2
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
On 5/14/19 7:54 AM, Pankaj Gupta wrote: > + if (!list_empty(&vpmem->req_list)) { > + req_buf = list_first_entry(&vpmem->req_list, > + struct virtio_pmem_request, list); > + req_buf->wq_buf_avail = true; > + wake_up(&req_buf->wq_buf); > + list_del(&req_buf->list); Yes, this change is the right one, thank you! > + /* > + * If virtqueue_...
2019 May 17
2
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
On 5/14/19 7:54 AM, Pankaj Gupta wrote: > + if (!list_empty(&vpmem->req_list)) { > + req_buf = list_first_entry(&vpmem->req_list, > + struct virtio_pmem_request, list); > + req_buf->wq_buf_avail = true; > + wake_up(&req_buf->wq_buf); > + list_del(&req_buf->list); Yes, this change is the right one, thank you! > + /* > + * If virtqueue_...
2019 Jun 11
2
[PATCH v12 2/7] virtio-pmem: Add virtio pmem driver
...g > + * interface. > + */ > +#include "virtio_pmem.h" > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + struct virtio_pmem *vpmem = vq->vdev->priv; > + struct virtio_pmem_request *req_data, *req_buf; > + unsigned long flags; > + unsigned int len; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { > + req_data->done = true; > + wake_up(&req_data->host_acked); > + > + if (!list_emp...
2019 Jun 11
2
[PATCH v12 2/7] virtio-pmem: Add virtio pmem driver
...g > + * interface. > + */ > +#include "virtio_pmem.h" > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + struct virtio_pmem *vpmem = vq->vdev->priv; > + struct virtio_pmem_request *req_data, *req_buf; > + unsigned long flags; > + unsigned int len; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { > + req_data->done = true; > + wake_up(&req_data->host_acked); > + > + if (!list_emp...
2019 May 17
0
[Qemu-devel] [PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
Hi Jakub, > > On 5/14/19 7:54 AM, Pankaj Gupta wrote: > > + if (!list_empty(&vpmem->req_list)) { > > + req_buf = list_first_entry(&vpmem->req_list, > > + struct virtio_pmem_request, list); > > + req_buf->wq_buf_avail = true; > > + wake_up(&req_buf->wq_buf); > > + list_del(&req_buf->list); > Yes, this change is the right one, thank you! Thank you...
2019 May 08
0
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
> > On 4/25/19 10:00 PM, Pankaj Gupta wrote: > > > +void host_ack(struct virtqueue *vq) > > +{ > > + unsigned int len; > > + unsigned long flags; > > + struct virtio_pmem_request *req, *req_buf; > > + struct virtio_pmem *vpmem = vq->vdev->priv; > > + > > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > > + req->done = true; > > + wake_up(&req->host_acked); > >...
2019 Jun 12
0
[PATCH v12 2/7] virtio-pmem: Add virtio pmem driver
...; +#include "virtio_pmem.h" > > +#include "nd.h" > > + > > + /* The interrupt handler */ > > +void host_ack(struct virtqueue *vq) > > +{ > > + struct virtio_pmem *vpmem = vq->vdev->priv; > > + struct virtio_pmem_request *req_data, *req_buf; > > + unsigned long flags; > > + unsigned int len; > > + > > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > > + while ((req_data = virtqueue_get_buf(vq, &len)) != NULL) { > > + req_data->done = true; > > + wake_up(&req_data->host_a...
2019 May 12
1
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...flushing > + * interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpm...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...flushing > + * interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; Nit: use reverse Christmas tree layout :) > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_ack...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...flushing > + * interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; Nit: use reverse Christmas tree layout :) > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_ack...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_ack...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_ack...
2019 May 10
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...#include "nd.h" > > > + > > > + /* The interrupt handler */ > > > +void host_ack(struct virtqueue *vq) > > > +{ > > > + unsigned int len; > > > + unsigned long flags; > > > + struct virtio_pmem_request *req, *req_buf; > > > + struct virtio_pmem *vpmem = vq->vdev->priv; > > > + > > > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > > > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > > > + req->done = true;...
2017 Dec 04
1
[nbdkit PATCH] nbd: Fix sporadic use-after-free
...{ @@ -282,9 +304,14 @@ nbd_request_full (struct handle *h, uint32_t type, uint64_t offset, } trans->next = h->trans; h->trans = trans; + fd = trans->u.fds[0]; + cookie = trans->u.cookie; nbd_unlock (h); - if (nbd_request_raw (h, type, offset, count, trans->u.cookie, req_buf) == 0) - return trans->u.fds[0]; + if (nbd_request_raw (h, type, offset, count, cookie, req_buf) == 0) + return fd; + trans = find_trans_by_cookie (h, cookie); + if (!trans) + return nbd_mark_dead (h); err: err = errno; @@ -309,7 +336,6 @@ static int nbd_reply_raw (struct hand...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...flushing > + * interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpm...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...flushing > + * interface. > + */ > +#include <linux/virtio_pmem.h> > +#include "nd.h" > + > + /* The interrupt handler */ > +void host_ack(struct virtqueue *vq) > +{ > + unsigned int len; > + unsigned long flags; > + struct virtio_pmem_request *req, *req_buf; > + struct virtio_pmem *vpmem = vq->vdev->priv; > + > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > + req->done = true; > + wake_up(&req->host_acked); > + > + if (!list_empty(&vpm...
2019 May 14
0
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...gt; +#include <linux/virtio_pmem.h> > > +#include "nd.h" > > + > > + /* The interrupt handler */ > > +void host_ack(struct virtqueue *vq) > > +{ > > + unsigned int len; > > + unsigned long flags; > > + struct virtio_pmem_request *req, *req_buf; > > + struct virtio_pmem *vpmem = vq->vdev->priv; > > Nit: use reverse Christmas tree layout :) o.k > > > + > > + spin_lock_irqsave(&vpmem->pmem_lock, flags); > > + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { > > + req->done...
2019 May 10
0
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...information + * from host and provides a virtio based flushing + * interface. + */ +#include <linux/virtio_pmem.h> +#include "nd.h" + + /* The interrupt handler */ +void host_ack(struct virtqueue *vq) +{ + unsigned int len; + unsigned long flags; + struct virtio_pmem_request *req, *req_buf; + struct virtio_pmem *vpmem = vq->vdev->priv; + + spin_lock_irqsave(&vpmem->pmem_lock, flags); + while ((req = virtqueue_get_buf(vq, &len)) != NULL) { + req->done = true; + wake_up(&req->host_acked); + + if (!list_empty(&vpmem->req_list)) { + req_buf = list_f...