qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Chen Qun <kuhn.chenqun@huawei.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: lvivier@redhat.com, Kevin Wolf <kwolf@redhat.com>,
	zhang.zhanghailiang@huawei.com, pannengyuan@huawei.com,
	Li Qiang <liq3ea@gmail.com>,
	ganqixin@huawei.com, Euler Robot <euler.robot@huawei.com>,
	Stefano Garzarella <sgarzare@redhat.com>
Subject: Re: [PATCH RESEND v2 7/7] block/file-posix: fix a possible undefined behavior
Date: Sun, 13 Dec 2020 18:46:22 +0100	[thread overview]
Message-ID: <300b4b01-9eb5-d2b8-8032-9910f84e825c@vivier.eu> (raw)
In-Reply-To: <20201023061218.2080844-8-kuhn.chenqun@huawei.com>

Le 23/10/2020 à 08:12, Chen Qun a écrit :
> From: Pan Nengyuan <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>
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
> Reviewed-by: Li Qiang <liq3ea@gmail.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
>  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 c63926d592..b711124672 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -2110,7 +2110,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: ");
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



  reply	other threads:[~2020-12-13 17:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23  6:12 [PATCH RESEND v2 0/7] some memleak trivial patchs Chen Qun
2020-10-23  6:12 ` [PATCH RESEND v2 1/7] tests/migration: fix memleak in wait_command/wait_command_fd Chen Qun
2020-10-23  6:34   ` Thomas Huth
2020-10-26  9:51   ` Maxim Levitsky
2020-10-23  6:12 ` [PATCH RESEND v2 2/7] qga/channel-posix: Plug memory leak in ga_channel_write_all() Chen Qun
2020-12-14  2:04   ` Chenqun (kuhn)
2020-10-23  6:12 ` [PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Chen Qun
2020-10-23  7:22   ` Thomas Huth
2020-12-13 17:44   ` Laurent Vivier
2020-12-14  2:26     ` Chenqun (kuhn)
2020-10-23  6:12 ` [PATCH RESEND v2 4/7] elf2dmp/pdb: Plug memleak in pdb_init_from_file Chen Qun
2020-10-23  7:22   ` Thomas Huth
2020-12-13 17:44   ` Laurent Vivier
2020-10-23  6:12 ` [PATCH RESEND v2 5/7] migration/colo: Plug memleaks in colo_process_incoming_thread Chen Qun
2020-12-14  3:12   ` Chenqun (kuhn)
2020-10-23  6:12 ` [PATCH RESEND v2 6/7] blockdev: Fix a memleak in drive_backup_prepare() Chen Qun
2020-12-13 17:50   ` Laurent Vivier
2020-10-23  6:12 ` [PATCH RESEND v2 7/7] block/file-posix: fix a possible undefined behavior Chen Qun
2020-12-13 17:46   ` Laurent Vivier [this message]
2020-10-30 10:23 ` [PATCH RESEND v2 0/7] some memleak trivial patchs Chenqun (kuhn)
2020-11-04  5:49 ` Chenqun (kuhn)
2020-12-09  2:48 ` Chenqun (kuhn)

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=300b4b01-9eb5-d2b8-8032-9910f84e825c@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=euler.robot@huawei.com \
    --cc=ganqixin@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=liq3ea@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=pannengyuan@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sgarzare@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).