From: Paolo Bonzini <pbonzini@redhat.com>
To: Sunil Muthuswamy <sunilmut@microsoft.com>,
Markus Armbruster <armbru@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] win32: boot broken when bind & data dir are the same
Date: Mon, 26 Oct 2020 08:57:37 +0100 [thread overview]
Message-ID: <9a206344-aa59-fbba-938d-9def34b18c31@redhat.com> (raw)
In-Reply-To: <SN4PR2101MB08802BF242C429A15DDB32ACC01B0@SN4PR2101MB0880.namprd21.prod.outlook.com>
On 24/10/20 11:14, Sunil Muthuswamy wrote:
> With upstream commit#ea1edcd7da1a "vl: relocate paths to data
> directories", the data dir logic was unified between POSIX &
> Win32. That patch moved to using 'get_relocated_path()', to
> find the data dir. There is a latent bug in get_relocated_path
> which can cause it to spin indefinitely, when the bind dir is
> the same as the passed in dir (in this case, it was the data
> dir).
>
> Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
> ---
> util/cutils.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/util/cutils.c b/util/cutils.c
> index be4e43a9ef..c395974fab 100644
> --- a/util/cutils.c
> +++ b/util/cutils.c
> @@ -949,7 +949,7 @@ char *get_relocated_path(const char *dir)
> bindir += len_bindir;
> dir = next_component(dir, &len_dir);
> bindir = next_component(bindir, &len_bindir);
> - } while (len_dir == len_bindir && !memcmp(dir, bindir, len_dir));
> + } while (len_dir && len_dir == len_bindir && !memcmp(dir, bindir, len_dir));
>
> /* Ascend from bindir to the common prefix with dir. */
> while (len_bindir) {
>
Queued, thanks.
Paolo
parent reply other threads:[~2020-10-26 7:58 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <SN4PR2101MB08802BF242C429A15DDB32ACC01B0@SN4PR2101MB0880.namprd21.prod.outlook.com>]
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=9a206344-aa59-fbba-938d-9def34b18c31@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sunilmut@microsoft.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).