diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-04-29 11:11:04 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-05-03 14:37:51 +0200 |
| commit | 61653b4a97b1c08b0f1d090da1ed981362a3961a (patch) | |
| tree | f9a314a64bf35f723e30a6a6520cfb6ebf695e85 | |
| parent | fd87be1dada5672f877e03c2ca8504458292c479 (diff) | |
| download | focaccia-qemu-61653b4a97b1c08b0f1d090da1ed981362a3961a.tar.gz focaccia-qemu-61653b4a97b1c08b0f1d090da1ed981362a3961a.zip | |
accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()
When mechanically moving the @dirty field to AccelCPUState
in commit 79f1926b2d, we neglected cpu->accel is still NULL
when we want to dereference it.
Reported-by: Volker Rümelin <vr_qemu@t-online.de>
Suggested-by: Volker Rümelin <vr_qemu@t-online.de>
Fixes: 79f1926b2d ("accel/nvmm: Use accel-specific per-vcpu @dirty field")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240429091918.27429-3-philmd@linaro.org>
| -rw-r--r-- | target/i386/nvmm/nvmm-all.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index f9cced53b3..65768aca03 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -982,7 +982,7 @@ nvmm_init_vcpu(CPUState *cpu) } } - cpu->accel->dirty = true; + qcpu->dirty = true; cpu->accel = qcpu; return 0; |