From bfffeac8aa3304ec2a8010dd60044da7f3883764 Mon Sep 17 00:00:00 2001 From: Yuval Shaia Date: Tue, 26 Nov 2019 12:26:37 +0200 Subject: [PATCH 1/5] MAINTAINERS: Update Yuval Shaia's email address Use gmail account for maintainer tasks. Signed-off-by: Yuval Shaia Acked-by: Marcel Apfelbaum Message-Id: <20191126102637.2038-1-yuval.shaia@oracle.com> Signed-off-by: Laurent Vivier --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index cd2dc137a3..df0893cd4c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2659,7 +2659,7 @@ F: tests/test-replication.c F: docs/block-replication.txt PVRDMA -M: Yuval Shaia +M: Yuval Shaia M: Marcel Apfelbaum S: Maintained F: hw/rdma/* From 638be47830ec77faf02dad650e4b9d266997067d Mon Sep 17 00:00:00 2001 From: Pan Nengyuan Date: Fri, 20 Dec 2019 09:34:10 +0800 Subject: [PATCH 2/5] util/module: fix a memory leak spotted by ASAN Fixes: 81d8ccb1bea4fb9eaaf4c8e30bd4021180a9a39f Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Markus Armbruster Message-Id: <1576805650-16380-1-git-send-email-pannengyuan@huawei.com> Signed-off-by: Laurent Vivier --- util/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/module.c b/util/module.c index e9fe3e5422..8c5315a7a3 100644 --- a/util/module.c +++ b/util/module.c @@ -214,6 +214,7 @@ bool module_load_one(const char *prefix, const char *lib_name) if (!success) { g_hash_table_remove(loaded_modules, module_name); + g_free(module_name); } for (i = 0; i < n_dirs; i++) { From bdf200a55357296dab095348a86f758f749aeef1 Mon Sep 17 00:00:00 2001 From: Pan Nengyuan Date: Wed, 8 Jan 2020 10:51:32 +0800 Subject: [PATCH 3/5] nbd: fix uninitialized variable warning 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 Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20200108025132.46956-1-pannengyuan@huawei.com> Signed-off-by: Laurent Vivier --- nbd/server.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index 24ebc1a805..87fcd2e7bf 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -2384,20 +2384,12 @@ static coroutine_fn int nbd_handle_request(NBDClient *client, !client->export_meta.bitmap, NBD_META_ID_BASE_ALLOCATION, errp); - if (ret < 0) { - return ret; - } - } - - if (client->export_meta.bitmap) { + } else { /* client->export_meta.bitmap */ ret = nbd_co_send_bitmap(client, request->handle, client->exp->export_bitmap, request->from, request->len, dont_fragment, true, NBD_META_ID_DIRTY_BITMAP, errp); - if (ret < 0) { - return ret; - } } return ret; From c7a5e7910517e2711215a9e869a733ffde696091 Mon Sep 17 00:00:00 2001 From: Pan Nengyuan Date: Wed, 8 Jan 2020 10:39:15 +0800 Subject: [PATCH 4/5] arm/translate-a64: fix uninitialized variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qemu/target/arm/translate-a64.c:13609:8: error: 'feature' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (!feature) { Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200108023915.52288-1-pannengyuan@huawei.com> Signed-off-by: Laurent Vivier --- target/arm/translate-a64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index d4bebbe629..63a3d26687 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -13585,6 +13585,8 @@ static void disas_crypto_three_reg_sha512(DisasContext *s, uint32_t insn) feature = dc_isar_feature(aa64_sha3, s); genfn = NULL; break; + default: + g_assert_not_reached(); } } else { switch (opcode) { From adb464ff671d124010953aad48dd9194cedc6ff6 Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Wed, 8 Jan 2020 19:42:07 +0800 Subject: [PATCH 5/5] vl: fix memory leak in configure_accelerators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The accel_list forgot to free, the asan output: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0xffff919331cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb) #1 0xffff913f7163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163) #2 0xffff91413d9b in g_strsplit (/lib64/libglib-2.0.so.0+0x73d9b) #3 0xaaab42fb58e7 in configure_accelerators /qemu/vl.c:2777 #4 0xaaab42fb58e7 in main /qemu/vl.c:4121 #5 0xffff8f9b0b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f) #6 0xaaab42fc1dab (/qemu/build/aarch64-softmmu/qemu-system-aarch64+0x8b1dab) Indirect leak of 4 byte(s) in 1 object(s) allocated from: #0 0xffff919331cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb) #1 0xffff913f7163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163) #2 0xffff9141243b in g_strdup (/lib64/libglib-2.0.so.0+0x7243b) #3 0xffff91413e6f in g_strsplit (/lib64/libglib-2.0.so.0+0x73e6f) #4 0xaaab42fb58e7 in configure_accelerators /qemu/vl.c:2777 #5 0xaaab42fb58e7 in main /qemu/vl.c:4121 #6 0xffff8f9b0b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f) #7 0xaaab42fc1dab (/qemu/build/aarch64-softmmu/qemu-system-aarch64+0x8b1dab) Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200108114207.58084-1-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- vl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vl.c b/vl.c index 86474a55c9..035a24e52b 100644 --- a/vl.c +++ b/vl.c @@ -2788,6 +2788,7 @@ static void configure_accelerators(const char *progname) error_report("invalid accelerator %s", *tmp); } } + g_strfreev(accel_list); } else { if (accel != NULL) { error_report("The -accel and \"-machine accel=\" options are incompatible");