search for: zero_size_ptr

Displaying 8 results from an estimated 8 matches for "zero_size_ptr".

2008 Dec 20
1
[PATCH 2/3] virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC)
...ng_virtqueue *vq, > + struct scatterlist sg[], > + unsigned int out, > + unsigned int in) > +{ > + struct vring_desc *desc; > + unsigned head; > + int i; > + > + desc = kmalloc((out + in) * sizeof(struct vring_desc), GFP_ATOMIC); kmalloc() returns ZERO_SIZE_PTR, if (out + in) == 0 > + if (!desc) > + return vq->vring.num; > + > + /* Transfer entries from the sg list into the indirect page */ > + for (i = 0; i < out; i++) { > + desc[i].flags = VRING_DESC_F_NEXT; > + desc[i].addr = sg_phys(sg); > + desc[i].len = sg->leng...
2008 Dec 20
1
[PATCH 2/3] virtio: indirect ring entries (VIRTIO_RING_F_INDIRECT_DESC)
...ng_virtqueue *vq, > + struct scatterlist sg[], > + unsigned int out, > + unsigned int in) > +{ > + struct vring_desc *desc; > + unsigned head; > + int i; > + > + desc = kmalloc((out + in) * sizeof(struct vring_desc), GFP_ATOMIC); kmalloc() returns ZERO_SIZE_PTR, if (out + in) == 0 > + if (!desc) > + return vq->vring.num; > + > + /* Transfer entries from the sg list into the indirect page */ > + for (i = 0; i < out; i++) { > + desc[i].flags = VRING_DESC_F_NEXT; > + desc[i].addr = sg_phys(sg); > + desc[i].len = sg->leng...
2020 Jun 17
4
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On 2020/6/11 ??7:34, Michael S. Tsirkin wrote: > static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) > { > kfree(vq->descs); > @@ -394,6 +400,9 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) > for (i = 0; i < dev->nvqs; ++i) { > vq = dev->vqs[i]; > vq->max_descs = dev->iov_limit; > + if
2020 Jun 17
4
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
On 2020/6/11 ??7:34, Michael S. Tsirkin wrote: > static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) > { > kfree(vq->descs); > @@ -394,6 +400,9 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) > for (i = 0; i < dev->nvqs; ++i) { > vq = dev->vqs[i]; > vq->max_descs = dev->iov_limit; > + if
2020 Jun 23
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...t;>>> worker. >>>> >>>> Thanks >>> It doesn't need iovecs at all, right? >>> >>> -- MST >> >> Yes, so we may choose to bypass the iovecs as well. >> >> Thanks >> > I think that the kmalloc_array returns ZERO_SIZE_PTR for all of them > in that case, so I didn't bother to skip the kmalloc_array parts. > Would you prefer to skip them all and let them NULL? Or have I > misunderstood what you mean? I'm ok with either approach, but my understanding is that Michael wants to skip them all. Thanks...
2020 Jun 23
0
[PATCH RFC v8 02/11] vhost: use batched get_vq_desc version
...; >> > > >> Thanks > > > It doesn't need iovecs at all, right? > > > > > > -- MST > > > > > > Yes, so we may choose to bypass the iovecs as well. > > > > Thanks > > > > I think that the kmalloc_array returns ZERO_SIZE_PTR for all of them > in that case, so I didn't bother to skip the kmalloc_array parts. > Would you prefer to skip them all and let them NULL? Or have I > misunderstood what you mean? > > Thanks! Sorry about being unclear. I just meant that it seems cleaner to check for iov_limit b...
2018 Feb 12
5
[PATCH] headers: untangle kmemleak.h from mm.h
...- security/apparmor/lsm.c | 1 - 21 files changed, 9 insertions(+), 14 deletions(-) --- lnx-416-rc1.orig/include/linux/slab.h +++ lnx-416-rc1/include/linux/slab.h @@ -125,7 +125,6 @@ #define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \ (unsigned long)ZERO_SIZE_PTR) -#include <linux/kmemleak.h> #include <linux/kasan.h> struct mem_cgroup; --- lnx-416-rc1.orig/kernel/ucount.c +++ lnx-416-rc1/kernel/ucount.c @@ -10,6 +10,7 @@ #include <linux/slab.h> #include <linux/cred.h> #include <linux/hash.h> +#include <linux/kmemlea...
2018 Feb 12
5
[PATCH] headers: untangle kmemleak.h from mm.h
...- security/apparmor/lsm.c | 1 - 21 files changed, 9 insertions(+), 14 deletions(-) --- lnx-416-rc1.orig/include/linux/slab.h +++ lnx-416-rc1/include/linux/slab.h @@ -125,7 +125,6 @@ #define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \ (unsigned long)ZERO_SIZE_PTR) -#include <linux/kmemleak.h> #include <linux/kasan.h> struct mem_cgroup; --- lnx-416-rc1.orig/kernel/ucount.c +++ lnx-416-rc1/kernel/ucount.c @@ -10,6 +10,7 @@ #include <linux/slab.h> #include <linux/cred.h> #include <linux/hash.h> +#include <linux/kmemlea...