[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/17] win32: boot broken when bind & data dir are the same
From: |
Paolo Bonzini |
Subject: |
[PULL 14/17] win32: boot broken when bind & data dir are the same |
Date: |
Mon, 26 Oct 2020 09:51:28 -0400 |
From: Sunil Muthuswamy <sunilmut@microsoft.com>
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>
Message-Id:
<SN4PR2101MB08802BF242C429A15DDB32ACC01B0@SN4PR2101MB0880.namprd21.prod.outlook.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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) {
--
2.26.2
- [PULL 17/17] machine: move SMP initialization from vl.c, (continued)
- [PULL 17/17] machine: move SMP initialization from vl.c, Paolo Bonzini, 2020/10/26
- [PULL 12/17] configure: move install_blobs from configure to meson, Paolo Bonzini, 2020/10/26
- [PULL 15/17] machine: remove deprecated -machine enforce-config-section option, Paolo Bonzini, 2020/10/26
- [PULL 13/17] WHPX: Fix WHPX build break, Paolo Bonzini, 2020/10/26
- [PULL 11/17] configure: remove unused variable from config-host.mak, Paolo Bonzini, 2020/10/26
- [PULL 01/17] build: fix macOS --enable-modules build, Paolo Bonzini, 2020/10/26
[PULL 14/17] win32: boot broken when bind & data dir are the same,
Paolo Bonzini <=
[PULL 09/17] configure: allow configuring localedir, Paolo Bonzini, 2020/10/26
[PULL 16/17] machine: move UP defaults to class_base_init, Paolo Bonzini, 2020/10/26
[PULL 10/17] configure: move directory options from config-host.mak to meson, Paolo Bonzini, 2020/10/26
Re: [PULL 00/17] Build system changes and misc fixes for QEMU 5.2 soft freeze, Peter Maydell, 2020/10/26