From: Pan Nengyuan
Fix compile warnings:
/mnt/sdb/qemu-new/qemu_test/qemu/target/i386/hax-posix.c:124:56: error: ‘%02d’
directive output may be truncated writing between 2 and 11 bytes into a region
of size 3 [-Werror=format-truncation=]
snprintf(name, sizeof HAX_VM_DEVFS, "/dev/hax_vm/vm%
From: Pan Nengyuan
This series patch fix memleaks when detaching vhost-user-blk device.
1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to
merge.
As the discussion in
https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html
2. convert virtio_del_qu
From: Pan Nengyuan
use the new virtio_delete_queue function to cleanup.
Signed-off-by: Pan Nengyuan
---
V2->V1:
- rename vqs to vhost_vqs to avoid confusing with virtqs (suggented by Stefan
Hajnoczi)
---
hw/block/vhost-user-blk.c | 19 +++
include/hw/virtio/vhost-user
From: Pan Nengyuan
virtio queues forgot to delete in unrealize, and aslo error path in
realize, this patch fix these memleaks, the leak stack is as follow:
Direct leak of 114688 byte(s) in 16 object(s) allocated from:
#0 0x7f24024fdbf0 in calloc (/lib64/libasan.so.3+0xcabf0)
#1 0x7f24016
From: Pan Nengyuan
'list' forgot to free at the end of dump_vmstate_json_to_file(), although it's
called only once, but seems like a clean code.
Fix the leak as follow:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fb946abd768 in __interceptor_malloc (/lib64/libasan.so.5+0x
From: Pan Nengyuan
There are some memleaks when we call 'device_list_properties'. This patch move
timer_new from init into realize to fix it.
Meanwhile, do the null check in mos6522_reset() to avoid null deref if we move
timer_new into realize().
Reported-by: Euler Robot
Signed-off-by: Pan Ne
From: Pan Nengyuan
This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The
leak stack is as follow:
Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7fb43c7cd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
#1 0x7fb43be2149d in g_malloc0 (/lib6
From: Pan Nengyuan
v1:
- Delay timer_new() from init() to realize() to fix memleaks.
v2:
- Similarly to other cleanups, move timer_new into realize in
target/s390x/cpu.c (Suggested by Philippe Mathieu-Daudé).
- Send these two patches as a series instead of sending each as a single
patc
From: Pan Nengyuan
There are some memleaks when we call 'device_list_properties'. This patch move
timer_new from init into realize to fix it.
Meanwhile, do the null check in mos6522_reset() to avoid null deref if we move
timer_new into realize().
Reported-by: Euler Robot
Signed-off-by: Pan Ne
From: Pan Nengyuan
This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The
leak stack is as follow:
Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7fb43c7cd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
#1 0x7fb43be2149d in g_malloc0 (/lib6
From: Pan Nengyuan
'fdt' forgot to clean both e500 and pnv when we call 'system_reset' on ppc,
this patch fix it. The leak stacks are as follow:
Direct leak of 4194304 byte(s) in 4 object(s) allocated from:
#0 0x7fafe37dd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
#1 0x7faf
From: Pan Nengyuan
This series patch fix memleaks when detaching vhost-user-blk device.
1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to
merge.
As the discussion in
https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html
2. convert virtio_del_qu
From: Pan Nengyuan
use the new virtio_delete_queue function to cleanup.
Signed-off-by: Pan Nengyuan
---
hw/block/vhost-user-blk.c | 11 +++
include/hw/virtio/vhost-user-blk.h | 1 +
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/block/vhost-user-blk.c b/hw/
From: Pan Nengyuan
virtio queues forgot to delete in unrealize, and aslo error path in
realize, this patch fix these memleaks, the leak stack is as follow:
Direct leak of 114688 byte(s) in 16 object(s) allocated from:
#0 0x7f24024fdbf0 in calloc (/lib64/libasan.so.3+0xcabf0)
#1 0x7f24016
From: Pan Nengyuan
spotted by asan, 'check-qtest-aarch64' runs fail if sanitizers is enabled.
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
tests/qtest/migration-test.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tests/qtest/migration-test.c
From: Pan Nengyuan
There is a memory leak when we call 'device_list_properties' with typename =
stellaris-gptm. It's easy to reproduce as follow:
virsh qemu-monitor-command vm1 --pretty '{"execute":
"device-list-properties", "arguments": {"typename": "stellaris-gptm"}}'
This patch delay tim
From: Pan Nengyuan
There is a memory leak when we call 'device_list_properties' with typename =
armv7m_systick. It's easy to reproduce as follow:
virsh qemu-monitor-command vm1 --pretty '{"execute":
"device-list-properties", "arguments": {"typename": "armv7m_systick"}}'
This patch delay tim
From: Pan Nengyuan
There is a memory leak when we call 'device_list_properties' with typename =
stm32f2xx_timer. It's easy to reproduce as follow:
virsh qemu-monitor-command vm1 --pretty '{"execute":
"device-list-properties", "arguments": {"typename": "stm32f2xx_timer"}}'
This patch delay
From: Pan Nengyuan
This series delay timer_new into realize() to fix some memleaks when we call
'device-list-properties'.
Pan Nengyuan (3):
armv7m_systick: delay timer_new to avoid memleaks
stm32f2xx_timer: delay timer_new to avoid memleaks
stellaris: delay timer_new to avoid memleaks
h
From: Pan Nengyuan
There is a memory leak when we call 'device_list_properties' with
typename = pl031. It's easy to reproduce as follow:
virsh qemu-monitor-command vm1 --pretty '{"execute":
"device-list-properties", "arguments": {"typename": "pl031"}}'
The memory leak stack:
Direct leak of
From: Pan Nengyuan
There is a memory leak when we call 'device_list_properties' with
typename = pl031. It's easy to reproduce as follow:
virsh qemu-monitor-command vm1 --pretty '{"execute":
"device-list-properties", "arguments": {"typename": "pl031"}}'
The memory leak stack:
Direct leak of
From: Pan Nengyuan
It's not a big deal, but 'check qtest-ppc/ppc64' runs fail if sanitizers is
enabled.
The memory leak stack is as follow:
Direct leak of 128 byte(s) in 4 object(s) allocated from:
#0 0x7f11756f5970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
#1 0x7f1174f2549d
From: Pan Nengyuan
Fixes the coverity warning:
CID 91708242: (EVALUATION_ORDER)
50. write_write_typo: In "config = config = irq / 16", "config" is written
twice with the same value.
50uint8_t config = config = irq / 16;
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
From: Pan Nengyuan
top->opaque is aleardy malloced in bdrv_new_open_driver(), and then change
the pointer but without freeing it. It will cause a memory leak, the leak
stack is as follow:
Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x7ff6f7be4970 (/lib64/libasan.so.5+0xef970)
From: Pan Nengyuan
Use virtio_delete_queue to make it more clear.
Signed-off-by: Pan Nengyuan
---
hw/scsi/virtio-scsi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 858b3aaccb..d3af42ef92 100644
--- a/hw/scsi/virt
From: Pan Nengyuan
This patch fix memleaks when attaching/detaching virtio-scsi device, the
memory leak stack is as follow:
Direct leak of 21504 byte(s) in 3 object(s) allocated from:
#0 0x7f491f2f2970 (/lib64/libasan.so.5+0xef970) ??:?
#1 0x7f491e94649d (/lib64/libglib-2.0.so.0+0x5249d) ?
From: Pan Nengyuan
This serie patch fix memleaks when detaching virtio-scsi device.
1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to
merge.
As the discussion in
https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html
2. replace virtio_del_queue
From: Pan Nengyuan
Use virtio_delete_queue to make it more clear.
Signed-off-by: Pan Nengyuan
---
Changes V2 to V1:
- replace virtio_del_queue to virtio_delete_queue to make it more clear.
---
hw/9pfs/virtio-9p-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/9pf
From: Pan Nengyuan
v1: fix memleaks in virtio_9p_device_unrealize
v2: split patch to make it easier for stable branches to merge
Pan Nengyuan (2):
virtio-9p-device: fix memleak in virtio_9p_device_unrealize
virtio-9p-device: convert to new virtio_delete_queue
hw/9pfs/virtio-9p-device.c | 1
From: Pan Nengyuan
v->vq forgot to cleanup in virtio_9p_device_unrealize, the memory leak
stack is as follow:
Direct leak of 14336 byte(s) in 2 object(s) allocated from:
#0 0x7f819ae43970 (/lib64/libasan.so.5+0xef970) ??:?
#1 0x7f819872f49d (/lib64/libglib-2.0.so.0+0x5249d) ??:?
#2 0x55a
From: Pan Nengyuan
If we call the qmp 'query-block' while qemu is working on
'block-commit', it will cause memleaks, the memory leak stack is as
follow:
Indirect leak of 12360 byte(s) in 3 object(s) allocated from:
#0 0x7f80f0b6d970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
#
From: Pan Nengyuan
Receive/transmit/event vqs forgot to cleanup in vhost_vsock_unrealize. This
patch save receive/transmit vq pointer in realize() and cleanup vqs
through those vq pointers in unrealize(). The leak stack is as follow:
Direct leak of 21504 byte(s) in 3 object(s) allocated from:
From: Pan Nengyuan
scsi_block_realize() use scsi_realize() to init some props, but
these props is not defined in scsi_block_disk_properties, so they will
not be freed.
This patch defines these prop in scsi_block_disk_properties and aslo
calls scsi_unrealize to avoid memleaks, the leak stack as
f
From: Pan Nengyuan
Receive/transmit/event vqs forgot to cleanup in vhost_vsock_unrealize. This
patch save receive/transmit vq pointer in realize() and cleanup vqs
through those vq pointers in unrealize(). The leak stack is as follow:
Direct leak of 21504 byte(s) in 3 object(s) allocated from:
From: Pan Nengyuan
v->vq forgot to cleanup in virtio_9p_device_unrealize, the memory leak
stack is as follow:
Direct leak of 14336 byte(s) in 2 object(s) allocated from:
#0 0x7f819ae43970 (/lib64/libasan.so.5+0xef970) ??:?
#1 0x7f819872f49d (/lib64/libglib-2.0.so.0+0x5249d) ??:?
#2 0x55a
From: Pan Nengyuan
scsi_block_realize() use scsi_realize() to init some props, but
these props is not defined in scsi_block_disk_properties, so they will
not be freed.
This patch defines these prop in scsi_block_disk_properties and aslo
calls scsi_unrealize to avoid memleaks, the leak stack as
f
From: Pan Nengyuan
It's a mismatch between g_strsplit and g_free, it will cause a memory leak as
follow:
[root@localhost]# ./aarch64-softmmu/qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
tcg
kvm
=
==1207900
From: Pan Nengyuan
v1: fix a mismatch in vl.c
v2: fix mismatch in vl.c and qga/main.c
Pan Nengyuan (2):
vl: Don't mismatch g_strsplit()/g_free()
qga/main: Don't mismatch g_strsplit/g_free in split_list()
qga/main.c | 2 +-
vl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Pan Nengyuan
fix a mismatch between g_strsplit and g_free
Reported-by: Laurent Vivier
Signed-off-by: Pan Nengyuan
---
Changes v2 to v1:
- fix a mismatch in qga/main.c
---
qga/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/main.c b/qga/main.c
index c35c2a2
From: Pan Nengyuan
It's a mismatch between g_strsplit and g_free, it will cause a memory leak as
follow:
[root@localhost]# ./aarch64-softmmu/qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
tcg
kvm
=
==1207900
From: Pan Nengyuan
Fixes:
/mnt/sdb/qemu/nbd/server.c: In function 'nbd_handle_request':
/mnt/sdb/qemu/nbd/server.c:2313:9: error: 'ret' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
int ret;
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
Changes v2 to
From: Pan Nengyuan
Fixes:
target/arm/translate-a64.c: In function 'disas_crypto_three_reg_sha512':
target/arm/translate-a64.c:13625:9: error: 'genfn' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
genfn(tcg_rd_ptr, tcg_rn_ptr, tcg_rm_ptr);
^~
From: Pan Nengyuan
Fixes:
target/arm/translate-a64.c: In function 'disas_crypto_three_reg_sha512':
target/arm/translate-a64.c:13625:9: error: 'genfn' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
genfn(tcg_rd_ptr, tcg_rn_ptr, tcg_rm_ptr);
^~
From: Pan Nengyuan
Fixes:
/mnt/sdb/qemu/nbd/server.c: In function 'nbd_handle_request':
/mnt/sdb/qemu/nbd/server.c:2313:9: error: 'ret' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
int ret;
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
nbd/server.c
From: Pan Nengyuan
spotted by ASAN
Fixes: 81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
util/module.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/module.c b/util/module.c
index e9fe3e5..8c5315a 100644
--- a/util/module.c
+++ b/u
From: Pan Nengyuan
Spotted by ASAN.
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
Changes V2 to V1:
- use a "goto cleanup", instead of duplicating the "free" functions.
- free "dest_cmdline" at the end.
---
tests/vhost-user-test.c | 5 -
1 file changed, 4 insertions(+), 1 delet
From: Pan Nengyuan
Spotted by ASAN.
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
tests/vhost-user-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 91ea373..54be931 100644
--- a/tests/vhost-user-test.c
+++ b/tests/
From: Pan Nengyuan
Fix a minor memory leak in riscv_sifive_u_soc_realize()
Reported-by: Euler Robot
Signed-off-by: Pan Nengyuan
---
hw/riscv/sifive_u.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 0140e95..0e12b3c 100644
--- a/hw/riscv/si
From: Pan Nengyuan
ivqs/ovqs/c_ivq/c_ovq forgot to cleanup in
virtio_serial_device_unrealize, the memory leak stack is as below:
Direct leak of 1290240 byte(s) in 180 object(s) allocated from:
#0 0x7fc9bfc27560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7fc9bed6f015 in g_malloc0 (/
From: Pan Nengyuan
ivq/dvq/svq/free_page_vq forgot to cleanup in
virtio_balloon_device_unrealize, the memory leak stack is as follow:
Direct leak of 14336 byte(s) in 2 object(s) allocated from:
#0 0x7f99fd9d8560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7f99fcb20015 in g_malloc0 (
From: Pan Nengyuan
This series add a new function to cleanup vqueue through a vq pointer, and fix
memory
leaks in virtio-balloon and virtio-serial-bus.
---
Changes v2 to v1:
- add a new function to cleanup vqueue through a vq pointer.
---
Changes v3 to v2:
- change function name from virtio_del
From: Michael S. Tsirkin
Devices tend to maintain vq pointers, allow deleting them through a vq
pointer.
Signed-off-by: Michael S. Tsirkin
Signed-off-by: Pan Nengyuan
[PMM: change function name to virtio_queue_cleanup; set used_elems to NULL
after free]
Cc: Amit Shah
Reviewed-by: Pankaj Gup
From: Pan Nengyuan
In currently implementation there will be a memory leak when
nbd_client_connect() returns error status. Here is an easy way to
reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -raw 143
Following is the asan output backtrack:
Direct leak of
From: Pan Nengyuan
The BDRVNBDState cleanup code is common in two places, add
nbd_clear_bdrvstate() function to do these cleanups.
Signed-off-by: Stefano Garzarella
Signed-off-by: Pan Nengyuan
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
v3:
- new patch, split form 2/2 patch (suggested by St
From: Pan Nengyuan
This series add a new function to do the common cleanups, and fix a memory
leak in nbd_open when nbd_client_connect returns error status.
---
Changes v2 to v1:
- add a new function to do the common cleanups (suggested by Stefano
Garzarella).
---
Changes v3 to v2:
- split in t
From: Pan Nengyuan
The BDRVNBDState cleanup code is common in two places, add
nbd_clear_bdrvstate() function to do these cleanups.
Signed-off-by: Stefano Garzarella
Signed-off-by: Pan Nengyuan
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
v3:
- new patch, split form 2/2 patch (suggested by St
From: Pan Nengyuan
In currently implementation there will be a memory leak when
nbd_client_connect() returns error status. Here is an easy way to
reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -raw 143
Following is the asan output backtrack:
Direct leak of
From: Pan Nengyuan
This series add a new function to do the common cleanups, and fix a memory
leak in nbd_open when nbd_client_connect returns error status.
---
Changes v2 to v1:
- add a new function to do the common cleanups (suggested by Stefano
Garzarella).
---
Changes v3 to v2:
- split in t
From: Pan Nengyuan
ivq/dvq/svq/free_page_vq is forgot to cleanup in
virtio_balloon_device_unrealize, the memory leak stack is as follow:
Direct leak of 14336 byte(s) in 2 object(s) allocated from:
#0 0x7f99fd9d8560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7f99fcb20015 in g_malloc
From: Pan Nengyuan
Devices tend to maintain vq pointers, allow deleting them trough a vq pointer.
Signed-off-by: Michael S. Tsirkin
Signed-off-by: Pan Nengyuan
---
Changes v2 to v1:
- add a new function virtio_delete_queue to cleanup vq through a vq pointer
---
hw/virtio/virtio.c | 16
From: Pan Nengyuan
ivqs/ovqs/c_ivq/c_ovq is forgot to cleanup in
virtio_serial_device_unrealize, the memory leak stack is as bellow:
Direct leak of 1290240 byte(s) in 180 object(s) allocated from:
#0 0x7fc9bfc27560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7fc9bed6f015 in g_malloc
t qemu. So I'm fine if
> this is deferred to 5.0, and just cc's qemu-stable (now done).
>
> I'll queue this through my NBD tree for 5.0.
>
>>
>>
>> 29.11.2019 10:25, pannengy...@huawei.com wrote:
>>> From: PanNengyuan
>
>>>
>>
On 2019/12/4 3:00, Eric Blake wrote:
> On 11/29/19 1:25 AM, pannengy...@huawei.com wrote:
>> From: PanNengyuan
>>
>> The BDRVNBDState cleanup code is common in two places, add
>> nbd_free_bdrvstate_prop() function to do these cleanups (suggested by
>> Stefano
I
only add a change summarize in 2/2 patch in this version. should I add a
summarize in 1/2 patch too if 1/2 patch is a new one?
>
> 29.11.2019 10:25, pannengy...@huawei.com wrote:
>> From: PanNengyuan
>
> Strange line. Check you git preferences. Such line appears (and make
On 2019/12/3 16:32, Laurent Vivier wrote:
> On 03/12/2019 01:53, pannengyuan wrote:
>>
>>
>> On 2019/12/2 21:58, Laurent Vivier wrote:
>>> On 02/12/2019 12:15, pannengy...@huawei.com wrote:
>>>> From: PanNengyuan
>>>&
On 2019/12/3 13:37, Michael S. Tsirkin wrote:
> On Tue, Dec 03, 2019 at 08:53:42AM +0800, pannengyuan wrote:
>>
>>
>> On 2019/12/2 21:58, Laurent Vivier wrote:
>>> On 02/12/2019 12:15, pannengy...@huawei.com wrote:
>>>> From: PanNengyuan
>>>&
On 2019/12/3 13:34, Michael S. Tsirkin wrote:
> On Tue, Dec 03, 2019 at 09:44:19AM +0800, pannengy...@huawei.com wrote:
>> From: PanNengyuan
>>
>> ivq/dvq/svq/free_page_vq is forgot to cleanup in
>> virtio_balloon_device_unrealize, the memory leak stack is as follow:
From: PanNengyuan
ivq/dvq/svq/free_page_vq is forgot to cleanup in
virtio_balloon_device_unrealize, the memory leak stack is as follow:
Direct leak of 14336 byte(s) in 2 object(s) allocated from:
#0 0x7f99fd9d8560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7f99fcb20015 in
On 2019/12/2 21:58, Laurent Vivier wrote:
> On 02/12/2019 12:15, pannengy...@huawei.com wrote:
>> From: PanNengyuan
>>
>> ivqs/ovqs/c_ivq/c_ovq is forgot to cleanup in
>> virtio_serial_device_unrealize, the memory leak stack is as bellow:
>>
>> Direct
From: PanNengyuan
ivqs/ovqs/c_ivq/c_ovq is forgot to cleanup in
virtio_serial_device_unrealize, the memory leak stack is as bellow:
Direct leak of 1290240 byte(s) in 180 object(s) allocated from:
#0 0x7fc9bfc27560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7fc9bed6f015 in
From: PanNengyuan
vdev->vq[i] is forgot to cleanup in
virtio_input_device_unrealize, the memory leak stack is as bellow:
Direct leak of 3584 byte(s) in 1 object(s) allocated from:
#0 0x7f84a49f6560 in calloc (/usr/lib64/libasan.so.3+0xc7560)
#1 0x7f84a3b3e015 in g_malloc0 (/usr/li
From: PanNengyuan
The BDRVNBDState cleanup code is common in two places, add
nbd_free_bdrvstate_prop() function to do these cleanups (suggested by
Stefano Garzarella).
Signed-off-by: PanNengyuan
---
block/nbd.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions
From: PanNengyuan
In currently implementation there will be a memory leak when
nbd_client_connect() returns error status. Here is an easy way to
reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -raw 143
Following is the asan output backtrack:
Direct leak of
On 2019/11/28 21:36, Stefano Garzarella wrote:
> On Thu, Nov 28, 2019 at 08:09:31PM +0800, pannengy...@huawei.com wrote:
>> From: PanNengyuan
>>
>> In currently implementation there will be a memory leak when
>> nbd_client_connect() returns error status. Here is
From: PanNengyuan
In currently implementation there will be a memory leak when
nbd_client_connect() returns error status. Here is an easy way to
reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -raw 143
Following is the asan output backtrack:
Direct leak of
Thanks for you suggestion, I'd be glad to do it, I will send a new
version later.
Cheers.
On 2019/11/28 18:41, Stefano Garzarella wrote:
> On Thu, Nov 28, 2019 at 06:32:49PM +0800, pannengyuan wrote:
>> Hi,
>> I think it's a better way, you can implement this new func
TM, but just a comment
> below:
>
>> From: PanNengyuan
>>
>> In currently implementation there will be a memory leak when
>> nbd_client_connect() returns error status. Here is an easy way to reproduce:
>>
>> 1. run qemu-iotests as follow and check the resul
From: PanNengyuan
In currently implementation there will be a memory leak when
nbd_client_connect() returns error status. Here is an easy way to reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -raw 143
Following is the asan output backtrack:
Direct leak of
From: PanNengyuan
This avoid a memory leak when qom-set is called to set throttle_group
limits, here is an easy way to reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -qcow2 184
Following is the asan output backtrack:
Direct leak of 912 byte(s) in 3
Thanks, I think it can be removed, I will send a new version later.
On 2019/11/26 17:59, Alberto Garcia wrote:
> On Tue 26 Nov 2019 09:17:02 AM CET, pannengy...@huawei.com wrote:
>> --- a/block/throttle-groups.c
>> +++ b/block/throttle-groups.c
>> @@ -912,6 +912,7 @@ static void throttle_group_set
From: PanNengyuan
This avoid a memory leak when qom-set is called to set throttle_group
limits, here is an easy way to reproduce:
1. run qemu-iotests as follow and check the result with asan:
./check -qcow2 184
Following is the asan output backtrack:
Direct leak of 912 byte(s) in 3
From: PanNengyuan
This fixes coverity issues 68911917:
360
CID 68911917: (NULL_RETURNS)
361. dereference: Dereferencing "source", which is known to be
"NULL".
361if (source->mask & event_mask) {
362
Thanks for you reply.
I think you are right, I will send a new version later.
On 2019/11/19 10:50, David Gibson wrote:
> On Mon, Nov 18, 2019 at 09:50:13AM +0800, pannengy...@huawei.com wrote:
>> From: PanNengyuan
>>
>> source is being dereferenced before it is null chec
From: PanNengyuan
Address Sanitizer shows memory leak in hw/gpio/aspeed_gpio.c:875
Reported-by: Euler Robot
Signed-off-by: PanNengyuan
---
hw/gpio/aspeed_gpio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
index 7acc5fa..41e11ea 100644
From: PanNengyuan
source is being dereferenced before it is null checked, hence there is a
potential null pointer dereference.
This fixes:
360
CID 68911917: (NULL_RETURNS)
361. dereference: Dereferencing "source", which is known to be
"NULL".
85 matches
Mail list logo