accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()
When mechanically moving the @dirty field to AccelCPUState in commit79f1926b2d
, 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>
This commit is contained in:
parent
fd87be1dad
commit
61653b4a97
@ -982,7 +982,7 @@ nvmm_init_vcpu(CPUState *cpu)
|
||||
}
|
||||
}
|
||||
|
||||
cpu->accel->dirty = true;
|
||||
qcpu->dirty = true;
|
||||
cpu->accel = qcpu;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user