All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pan Nengyuan <pannengyuan@huawei.com>
To: <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	zhang.zhanghailiang@huawei.com, qemu-block@nongnu.org,
	Pan Nengyuan <pannengyuan@huawei.com>,
	Max Reitz <mreitz@redhat.com>,
	euler.robot@huawei.com, kuhn.chenqun@huawei.com,
	Aarushi Mehta <mehta.aaru20@gmail.com>
Subject: [PATCH 10/12] block/file-posix: fix a possible undefined behavior
Date: Fri, 14 Aug 2020 12:02:39 -0400	[thread overview]
Message-ID: <20200814160241.7915-11-pannengyuan@huawei.com> (raw)
In-Reply-To: <20200814160241.7915-1-pannengyuan@huawei.com>

local_err is not initialized to NULL, it will cause a assert error as below:
qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed.

Fixes: c6447510690
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
---
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Aarushi Mehta <mehta.aaru20@gmail.com>
Cc: qemu-block@nongnu.org
---
 block/file-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/file-posix.c b/block/file-posix.c
index 9a00d4190a..697a7d9eea 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2113,7 +2113,7 @@ static void raw_aio_attach_aio_context(BlockDriverState *bs,
 #endif
 #ifdef CONFIG_LINUX_IO_URING
     if (s->use_linux_io_uring) {
-        Error *local_err;
+        Error *local_err = NULL;
         if (!aio_setup_linux_io_uring(new_context, &local_err)) {
             error_reportf_err(local_err, "Unable to use linux io_uring, "
                                          "falling back to thread pool: ");
-- 
2.18.2



  parent reply	other threads:[~2020-08-14 10:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 16:02 [PATCH 00/12] fix some error memleaks Pan Nengyuan
2020-08-14 16:02 ` [PATCH 01/12] qga/channel-posix: Plug memory leak in ga_channel_write_all() Pan Nengyuan
2020-08-26 11:57   ` Li Qiang
2020-08-14 16:02 ` [PATCH 02/12] hw/vfio/ap: Plug memleak in vfio_ap_get_group() Pan Nengyuan
2020-08-14  9:46   ` Pierre Morel
2020-08-17 16:11   ` Cornelia Huck
2020-08-26 11:03   ` Li Qiang
2020-08-26 11:41     ` Cornelia Huck
2020-08-26 11:53       ` Li Qiang
2020-08-14 16:02 ` [PATCH 03/12] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Pan Nengyuan
2020-08-23 18:12   ` Viktor Prutyanov
2020-08-26 10:56   ` Li Qiang
2020-08-14 16:02 ` [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file Pan Nengyuan
2020-08-23 18:17   ` Viktor Prutyanov
2020-08-26 10:54   ` Li Qiang
2020-08-14 16:02 ` [PATCH 05/12] target/i386/sev: Plug memleak in sev_read_file_base64 Pan Nengyuan
2020-08-26 10:53   ` Li Qiang
2020-08-14 16:02 ` [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context() Pan Nengyuan
2020-08-26 12:20   ` Li Qiang
2020-08-27  7:06     ` Pan Nengyuan
2020-08-27 11:08       ` Li Qiang
2020-08-14 16:02 ` [PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features Pan Nengyuan
2020-08-26 12:25   ` Li Qiang
2020-08-14 16:02 ` [PATCH 08/12] migration/colo: Plug memleaks in colo_process_incoming_thread Pan Nengyuan
2020-08-26 12:37   ` Li Qiang
2020-08-27  3:06     ` Pan Nengyuan
2020-08-14 16:02 ` [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare() Pan Nengyuan
2020-08-17  9:41   ` Kevin Wolf
2020-08-26 10:45   ` Li Qiang
2020-08-14 16:02 ` Pan Nengyuan [this message]
2020-08-17  8:57   ` [PATCH 10/12] block/file-posix: fix a possible undefined behavior Stefano Garzarella
2020-08-17  9:38   ` Kevin Wolf
2020-08-26 10:40   ` Li Qiang
2020-08-14 16:02 ` [PATCH 11/12] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string Pan Nengyuan
2020-08-26 10:37   ` Li Qiang
2020-08-14 16:02 ` [PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good Pan Nengyuan
2020-08-14 14:50   ` Li Qiang
2020-08-15  3:10     ` Pan Nengyuan
2020-08-26  6:32 ` [PATCH 00/12] fix some error memleaks Pan Nengyuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200814160241.7915-11-pannengyuan@huawei.com \
    --to=pannengyuan@huawei.com \
    --cc=euler.robot@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=mehta.aaru20@gmail.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.