Displaying 20 results from an estimated 3000 matches similar to: "[patch] vhost: NULL vs ERR_PTR bug"
2015 Jul 15
3
[patch] vhost: NULL vs ERR_PTR bug
Am 15.07.2015 13:28, schrieb Michael S. Tsirkin:
> On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote:
>> There is only one caller for vhost_kvzalloc() and it expects NULL on
>> allocation failure. Most people would probably expect that so let's
>> change ERR_PTR(-ENOMEM) to NULL.
>>
>> Fixes: 4de7255f7d2b ('vhost: extend memory regions
2015 Jul 15
3
[patch] vhost: NULL vs ERR_PTR bug
Am 15.07.2015 13:28, schrieb Michael S. Tsirkin:
> On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote:
>> There is only one caller for vhost_kvzalloc() and it expects NULL on
>> allocation failure. Most people would probably expect that so let's
>> change ERR_PTR(-ENOMEM) to NULL.
>>
>> Fixes: 4de7255f7d2b ('vhost: extend memory regions
2015 Jul 15
0
[patch] vhost: NULL vs ERR_PTR bug
On Wed, 15 Jul 2015, walter harms wrote:
>
>
> Am 15.07.2015 13:28, schrieb Michael S. Tsirkin:
> > On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote:
> >> There is only one caller for vhost_kvzalloc() and it expects NULL on
> >> allocation failure. Most people would probably expect that so let's
> >> change ERR_PTR(-ENOMEM) to NULL.
>
2015 Jul 15
0
[patch] vhost: NULL vs ERR_PTR bug
On Wed, Jul 15, 2015 at 02:16:59PM +0300, Dan Carpenter wrote:
> There is only one caller for vhost_kvzalloc() and it expects NULL on
> allocation failure. Most people would probably expect that so let's
> change ERR_PTR(-ENOMEM) to NULL.
>
> Fixes: 4de7255f7d2b ('vhost: extend memory regions allocation to vmalloc')
> Signed-off-by: Dan Carpenter <dan.carpenter
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
Current pre-sorted memory region array has some limitations for future
device IOTLB conversion:
1) need extra work for adding and removing a single region, and it's
expected to be slow because of sorting or memory re-allocation.
2) need extra work of removing a large range which may intersect
several regions with different size.
3) need trick for a replacement policy like LRU
To
2016 Jan 18
2
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
Current pre-sorted memory region array has some limitations for future
device IOTLB conversion:
1) need extra work for adding and removing a single region, and it's
expected to be slow because of sorting or memory re-allocation.
2) need extra work of removing a large range which may intersect
several regions with different size.
3) need trick for a replacement policy like LRU
To
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This
2016 Mar 25
4
[RFC PATCH V2 0/2] basic device IOTLB support
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace(qemu) implementation of
iommu for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- Fill the translation request in a preset userspace address (This
2013 Jun 21
5
[patch] xen-netback: double free on unload
There is a typo here, "i" vs "j", so we would crash on module_exit().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index a0b50ad..130bcb2 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1968,8 +1968,8 @@ static void __exit
2015 May 08
4
[patch v2] virtio_console: silence a static checker warning
My static checker complains that this sprintf() can overflow but really
it can't. Just silence the warning by using snprintf().
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
v2: the overflow is not possible so just leave the buffer size alone and
silence the warning with snprintf().
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index
2015 May 08
4
[patch v2] virtio_console: silence a static checker warning
My static checker complains that this sprintf() can overflow but really
it can't. Just silence the warning by using snprintf().
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
v2: the overflow is not possible so just leave the buffer size alone and
silence the warning with snprintf().
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index
2016 Mar 25
0
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
Current pre-sorted memory region array has some limitations for future
device IOTLB conversion:
1) need extra work for adding and removing a single region, and it's
expected to be slow because of sorting or memory re-allocation.
2) need extra work of removing a large range which may intersect
several regions with different size.
3) need trick for a replacement policy like LRU
To
2016 Jan 19
0
[PATCH RFC] vhost: convert pre sorted vhost memory array to interval tree
On Mon, 18 Jan 2016 10:42:29 +0800
Jason Wang <jasowang at redhat.com> wrote:
> Current pre-sorted memory region array has some limitations for future
> device IOTLB conversion:
>
> 1) need extra work for adding and removing a single region, and it's
> expected to be slow because of sorting or memory re-allocation.
> 2) need extra work of removing a large range
2016 Apr 27
1
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
On Fri, Mar 25, 2016 at 10:34:33AM +0800, Jason Wang wrote:
> Current pre-sorted memory region array has some limitations for future
> device IOTLB conversion:
>
> 1) need extra work for adding and removing a single region, and it's
> expected to be slow because of sorting or memory re-allocation.
> 2) need extra work of removing a large range which may intersect
>
2016 Apr 27
1
[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree
On Fri, Mar 25, 2016 at 10:34:33AM +0800, Jason Wang wrote:
> Current pre-sorted memory region array has some limitations for future
> device IOTLB conversion:
>
> 1) need extra work for adding and removing a single region, and it's
> expected to be slow because of sorting or memory re-allocation.
> 2) need extra work of removing a large range which may intersect
>
2016 Jun 23
3
[PATCH V2 0/3] basic device IOTLB support for vhost_net
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace IOMMU implementation (qemu)
for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- when there's a IOTLB miss, it will notify userspace through
2016 Jun 23
3
[PATCH V2 0/3] basic device IOTLB support for vhost_net
This patch tries to implement an device IOTLB for vhost. This could be
used with for co-operation with userspace IOMMU implementation (qemu)
for a secure DMA environment (DMAR) in guest.
The idea is simple. When vhost meets an IOTLB miss, it will request
the assistance of userspace to do the translation, this is done
through:
- when there's a IOTLB miss, it will notify userspace through
2013 Oct 21
1
Re: [patch] Btrfs: fix access_ok() check in btrfs_ioctl_send()
On Thu, Jan 10, 2013 at 11:57:25AM +0300, Dan Carpenter wrote:
> The closing parenthesis is in the wrong place. We want to check
> "sizeof(*arg->clone_sources) * arg->clone_sources_count" instead of
> "sizeof(*arg->clone_sources * arg->clone_sources_count)".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Original message id:
2015 May 08
2
[patch] virtio_console: use snprintf() for safety
My static checker complains that this sprintf() can overflow.
vdev->index is selected by ida_simple_get() in register_virtio_device()
so my reading of the code is that this overflow is theoretically
possible. The max value of "id" is configurable and I'm not sure what
typical values are.
Anyway, it's simple enough to make the buffer larger and I changed it to
snprintf() as
2015 May 08
2
[patch] virtio_console: use snprintf() for safety
My static checker complains that this sprintf() can overflow.
vdev->index is selected by ida_simple_get() in register_virtio_device()
so my reading of the code is that this overflow is theoretically
possible. The max value of "id" is configurable and I'm not sure what
typical values are.
Anyway, it's simple enough to make the buffer larger and I changed it to
snprintf() as