[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/25] accel/tcg: Remove dead code from rr_cpu_thread_fn()
From: |
Peter Maydell |
Subject: |
[PULL 09/25] accel/tcg: Remove dead code from rr_cpu_thread_fn() |
Date: |
Thu, 5 Sep 2024 14:00:44 +0100 |
The main loop in rr_cpu_thread_fn() can never terminate, so the
code at the end of the function to clean up the RCU subsystem is
dead code. Replace it with g_assert_not_reached().
(This is different from the other cpu_thread_fn for e.g. MTTCG or
for the KVM accelerator -- those can exit, if the vCPU they
are responsible for is unplugged. But the RR cpu thread fn
handles all CPUs in the system in a round-robin way, so even
if one is unplugged it keeps looping.)
Resolves: Coverity CID 1547782
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240815143634.3413679-1-peter.maydell@linaro.org
---
accel/tcg/tcg-accel-ops-rr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
index c59c77da4b3..8ebadf8e9e1 100644
--- a/accel/tcg/tcg-accel-ops-rr.c
+++ b/accel/tcg/tcg-accel-ops-rr.c
@@ -302,9 +302,7 @@ static void *rr_cpu_thread_fn(void *arg)
rr_deal_with_unplugged_cpus();
}
- rcu_remove_force_rcu_notifier(&force_rcu);
- rcu_unregister_thread();
- return NULL;
+ g_assert_not_reached();
}
void rr_start_vcpu_thread(CPUState *cpu)
--
2.34.1
- [PULL 00/25] target-arm queue, Peter Maydell, 2024/09/05
- [PULL 03/25] target/arm: Pass env pointer through to gvec_bfdot helper, Peter Maydell, 2024/09/05
- [PULL 12/25] hw/arm/virt: Default to two-stage SMMU from virt-9.2, Peter Maydell, 2024/09/05
- [PULL 05/25] target/arm: Pass env pointer through to gvec_bfmmla helper, Peter Maydell, 2024/09/05
- [PULL 06/25] target/arm: Prepare bfdotadd() callers for FEAT_EBF support, Peter Maydell, 2024/09/05
- [PULL 01/25] target/arm: Allow setting the FPCR.EBF bit for FEAT_EBF16, Peter Maydell, 2024/09/05
- [PULL 09/25] accel/tcg: Remove dead code from rr_cpu_thread_fn(),
Peter Maydell <=
- [PULL 07/25] target/arm: Implement FPCR.EBF=1 semantics for bfdotadd(), Peter Maydell, 2024/09/05
- [PULL 11/25] hw/arm/smmuv3: Update comment documenting "stage" property, Peter Maydell, 2024/09/05
- [PULL 14/25] hw/misc/xlnx-versal-cfu: destroy fifo in finalize, Peter Maydell, 2024/09/05
- [PULL 10/25] hw: add compat machines for 9.2, Peter Maydell, 2024/09/05
- [PULL 13/25] hw/arm/sbsa-ref: Use two-stage SMMU, Peter Maydell, 2024/09/05
- [PULL 04/25] target/arm: Pass env pointer through to gvec_bfdot_idx helper, Peter Maydell, 2024/09/05
- [PULL 16/25] hw/nvram/xlnx-bbram: Call register_finalize_block, Peter Maydell, 2024/09/05
- [PULL 17/25] hw/nvram/xlnx-zynqmp-efuse: Call register_finalize_block, Peter Maydell, 2024/09/05
- [PULL 23/25] hw/arm/boot: Report error msg if loading elf/dtb failed, Peter Maydell, 2024/09/05
- [PULL 08/25] target/arm: Enable FEAT_EBF16 in the "max" CPU, Peter Maydell, 2024/09/05