similar to: [PATCH -next] virtio: fix possible memory leak in virtqueue_add()

Displaying 20 results from an estimated 1000 matches similar to: "[PATCH -next] virtio: fix possible memory leak in virtqueue_add()"

2016 Aug 02
0
[PATCH -next v2] virtio: fix possible memory leak in virtqueue_add()
'desc' is malloced in virtqueue_add() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com> --- drivers/virtio/virtio_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 114a0c8..e4be912 100644 ---
2012 Nov 12
2
[PATCH -next] virtio: balloon: fix missing unlock on error in fill_balloon()
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> Add the missing unlock before return from function fill_balloon() in the error handling case. Introduced by 9864a8(virtio_balloon: introduce migration primitives to balloon pages) dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn> ---
2012 Nov 12
2
[PATCH -next] virtio: balloon: fix missing unlock on error in fill_balloon()
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> Add the missing unlock before return from function fill_balloon() in the error handling case. Introduced by 9864a8(virtio_balloon: introduce migration primitives to balloon pages) dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn> ---
2013 May 31
2
[PATCH] xen-pciback: fix error return code in pcistub_irq_handler_switch()
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> Fix to return -ENOENT in the pcistub_device_find() and pci_get_drvdata() error handling case instead of 0(overwrite to 0 by str_to_slot()), as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn> --- drivers/xen/xen-pciback/pci_stub.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3
2013 May 31
2
[PATCH] xen-pciback: fix error return code in pcistub_irq_handler_switch()
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> Fix to return -ENOENT in the pcistub_device_find() and pci_get_drvdata() error handling case instead of 0(overwrite to 0 by str_to_slot()), as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn> --- drivers/xen/xen-pciback/pci_stub.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3
2023 May 17
2
[PATCH vhost v9 04/12] virtio_ring: virtqueue_add() support premapped
virtuque_add() adds parameter premapped. Signed-off-by: Xuan Zhuo <xuanzhuo at linux.alibaba.com> --- drivers/virtio/virtio_ring.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1ffab1eb40c0..e2fc50c05bec 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -2135,6
2016 Aug 02
1
[PATCH -next] vhost: fix missing unlock on error in vhost_net_set_features()
Add the missing unlock before return from function vhost_net_set_features() in the error handling case. Fixes: eefe82d9b81f ('vhost: new device IOTLB API') Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com> --- drivers/vhost/net.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c6bdd90..5dc128a 100644
2016 Aug 02
1
[PATCH -next] VSOCK: Use kvfree()
Use kvfree() instead of open-coding it. Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com> --- drivers/vhost/vsock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 028ca16..0ddf3a2 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -434,10 +434,7 @@ err: static void vhost_vsock_free(struct
2016 Aug 02
1
[PATCH -next] vhost: fix missing unlock on error in vhost_net_set_features()
Add the missing unlock before return from function vhost_net_set_features() in the error handling case. Fixes: eefe82d9b81f ('vhost: new device IOTLB API') Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com> --- drivers/vhost/net.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c6bdd90..5dc128a 100644
2016 Aug 02
1
[PATCH -next] VSOCK: Use kvfree()
Use kvfree() instead of open-coding it. Signed-off-by: Wei Yongjun <weiyj.lk at gmail.com> --- drivers/vhost/vsock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 028ca16..0ddf3a2 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -434,10 +434,7 @@ err: static void vhost_vsock_free(struct
2013 Mar 11
1
[Bridge] [PATCH -next] bridge: using for_each_set_bit_from to simplify the code
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> Using for_each_set_bit_from() to simplify the code. Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn> --- net/bridge/br_fdb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index b0812c9..48fe761 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c
2016 Apr 08
1
[PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes
This function compiles to 839 bytes of machine code. In C, it is ~150 lines long. This function has 3 callsites. Signed-off-by: Denys Vlasenko <dvlasenk at redhat.com> CC: "Michael S. Tsirkin" <mst at redhat.com> CC: virtualization at lists.linux-foundation.org CC: linux-kernel at vger.kernel.org --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1
2016 Apr 08
1
[PATCH] drivers/virtio/virtio_ring.c: Deinline virtqueue_add, save 1016 bytes
This function compiles to 839 bytes of machine code. In C, it is ~150 lines long. This function has 3 callsites. Signed-off-by: Denys Vlasenko <dvlasenk at redhat.com> CC: "Michael S. Tsirkin" <mst at redhat.com> CC: virtualization at lists.linux-foundation.org CC: linux-kernel at vger.kernel.org --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches, everything works. There
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches, everything works. There
2013 Mar 06
7
[PATCH 0/6] virtio_add_buf replacement.
OK, so I've spent a few days benchmarking. Turns out 80% of virtio_add_buf cases are uni-directional (including the always-performance-sensitive networking code), and that gets no performance penalty (though tests with real networking would be appreciated!). I'm not reposting all the "convert driver to virtio_add_outbuf()" patches: just the scsi one which I didn't have
2013 Mar 06
7
[PATCH 0/6] virtio_add_buf replacement.
OK, so I've spent a few days benchmarking. Turns out 80% of virtio_add_buf cases are uni-directional (including the always-performance-sensitive networking code), and that gets no performance penalty (though tests with real networking would be appreciated!). I'm not reposting all the "convert driver to virtio_add_outbuf()" patches: just the scsi one which I didn't have
2023 May 17
12
[PATCH vhost v9 00/12] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2014 Sep 03
8
[PATCH 0/3] virtio: simplify virtio_ring.
I resurrected these patches after prompting from Andy Lutomirski's recent patches. I put them on the back-burner because vring_bench had a 15% slowdown on my laptop: pktgen testing revealed a speedup, if anything, so I've cleaned them up. Rusty Russell (3): virtio_net: pass well-formed sgs to virtqueue_add_*() virtio_ring: assume sgs are always well-formed. virtio_ring: unify
2014 Sep 03
8
[PATCH 0/3] virtio: simplify virtio_ring.
I resurrected these patches after prompting from Andy Lutomirski's recent patches. I put them on the back-burner because vring_bench had a 15% slowdown on my laptop: pktgen testing revealed a speedup, if anything, so I've cleaned them up. Rusty Russell (3): virtio_net: pass well-formed sgs to virtqueue_add_*() virtio_ring: assume sgs are always well-formed. virtio_ring: unify