[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/4] qemu-io: initialize progname with error_
From: |
Hitoshi Mitake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/4] qemu-io: initialize progname with error_set_progname() |
Date: |
Mon, 02 Feb 2015 18:51:09 +0900 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj$(D+W(B) APEL/10.8 Emacs/24.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
At Thu, 22 Jan 2015 18:08:11 +0900,
Hitoshi Mitake wrote:
>
> Calling error_get_progname() in the context of qemu-io can cause
> segmentation fault because qemu-io doesn't initialize its progname
> with error_set_progname(). This patch adds the initialization.
>
> Currently, the missing call of error_set_progname() doesn't cause any
> problems because qemu-io doesn't use error_get_progname(). This patch
> is a proactive action.
>
> Cc: Kevin Wolf <address@hidden>
> Cc: Stefan Hajnoczi <address@hidden>
> Cc: Markus Armbruster <address@hidden>
> Signed-off-by: Hitoshi Mitake <address@hidden>
> ---
> qemu-io.c | 1 +
> 1 file changed, 1 insertion(+)
Hi Kevin, Stefan, could you pick this patch? sheepdog driver has a
pending patch [1] which depends on it. I believe at least qemu-io
should call error_set_progname() because block drivers can use the
qemu-error infrastructure.
[1]
https://github.com/sheepdog/qemu/commit/a95c35e606a2a189e7dbaf645277c5c306b01e4b
Thanks,
Hitoshi
>
> v2:
> - pass argv[0] directly to error_set_progname() without calling basename
>
> diff --git a/qemu-io.c b/qemu-io.c
> index 91a445a..0e7d7d4 100644
> --- a/qemu-io.c
> +++ b/qemu-io.c
> @@ -396,6 +396,7 @@ int main(int argc, char **argv)
>
> progname = basename(argv[0]);
> qemu_init_exec_dir(argv[0]);
> + error_set_progname(argv[0]);
>
> bdrv_init();
>
> --
> 1.9.1
>
- Re: [Qemu-devel] [PATCH v2 1/4] qemu-io: initialize progname with error_set_progname(),
Hitoshi Mitake <=