[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/20] hw/mips/loongson3_virt: Fix condition of IPI IOCSR connecti
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 02/20] hw/mips/loongson3_virt: Fix condition of IPI IOCSR connection |
Date: |
Tue, 20 Aug 2024 00:50:58 +0200 |
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> CID 1547264: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "ipi" suggests that it may be null, but it has already
>>> been dereferenced on all paths leading to the check.
Resolves: Coverity CID 1547264
Link:
https://lore.kernel.org/qemu-devel/752417ad-ab72-4fed-8d1f-af41f15bc225@app.fastmail.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240621-loongson3-ipi-follow-v2-2-848eafcbb67e@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/mips/loongson3_virt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 27a85e3614..2067b4fecb 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -574,7 +574,7 @@ static void mips_loongson3_virt_init(MachineState *machine)
cpu_mips_clock_init(cpu);
qemu_register_reset(main_cpu_reset, cpu);
- if (ipi) {
+ if (!kvm_enabled()) {
hwaddr base = ((hwaddr)node << 44) + virt_memmap[VIRT_IPI].base;
base += core * 0x100;
qdev_connect_gpio_out(ipi, i, cpu->env.irq[6]);
--
2.45.2
- [PULL 00/20] Misc fixes for 2024-08-20, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 01/20] hw/mips/loongson3_virt: Store core_iocsr into LoongsonMachineState, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 02/20] hw/mips/loongson3_virt: Fix condition of IPI IOCSR connection,
Philippe Mathieu-Daudé <=
- [PULL 03/20] qemu-options.hx: correct formatting -smbios type=4, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 05/20] target/mips: Use correct MMU index in get_pte(), Philippe Mathieu-Daudé, 2024/08/19
- [PULL 07/20] hw/dma/xilinx_axidma: Use semicolon at end of statement, not comma, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 04/20] target/mips: Pass page table entry size as MemOp to get_pte(), Philippe Mathieu-Daudé, 2024/08/19
- [PULL 08/20] hw/remote/message.c: Don't directly invoke DeviceClass:reset, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 16/20] target/sparc: Restrict STQF to sparcv9, Philippe Mathieu-Daudé, 2024/08/19
- [PULL 18/20] hw/i386/pc: Unify vmport=auto handling, Philippe Mathieu-Daudé, 2024/08/19