From nobody Sun Nov 24 09:44:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723732657; cv=none; d=zohomail.com; s=zohoarc; b=bVq9f09zY6ea7mqk9sHTwc5so19j3wqxDQ447obfB8UeVUaqM3xdoYd9HsOrvwoMr9OPeze6CpEsZSqxe1SZaqasKieYJC6UmSUHhrFXf6q2HqCMaHaZMFOA8Pjm2YMMPIWRxvrZseyBZRr59qYgF9dGd05HssI8FyItVi2GP10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723732657; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kw/kMF2UrPFy/1Y87Dczx++p4s+nUe86BSQw9sw3PK8=; b=WPYHsIaCKpunljgtzrSekWgWnczbpKioy1QKJEGR130xOw3UYQXAcNAeJRP2gJ/Rw4i7QhznBFHjxr7TxOywqk9USTjkX2tHPtp9Ydtqp31f3Wn2kxxccrtitXjxGZ5OgiHSE5E6oGjtsYZPvM2xGwmMRgYl1V/MBDT+mic/pN0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723732657430705.3219244900597; Thu, 15 Aug 2024 07:37:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sebaj-0008OY-BS; Thu, 15 Aug 2024 10:36:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sebai-0008N5-66 for qemu-devel@nongnu.org; Thu, 15 Aug 2024 10:36:40 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sebag-0006Sf-Ei for qemu-devel@nongnu.org; Thu, 15 Aug 2024 10:36:39 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-367963ea053so669424f8f.2 for ; Thu, 15 Aug 2024 07:36:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37189839f16sm1667146f8f.18.2024.08.15.07.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 07:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723732596; x=1724337396; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kw/kMF2UrPFy/1Y87Dczx++p4s+nUe86BSQw9sw3PK8=; b=egi9Y8hYPRy+/HeByUkCiG04B34XyN84g/eFf8D7p8nXHw9NrVpf7EY1HFvO5JIe2y +rue4tJc7u6AyK8w45m0uoeG2xSwXC/TKE1TQEXp0YRdxw2EgIGKJecI5RdL7c/vr6MS ZSOGnr0Q2YrsHpFB8iInqRE8CgTH5A9vY4fNwVQL8P4TuFb7Va6oLtspcu0Lyw31sF53 QMV2A5mBFsveHVSm2pdEZ3PVDVmZ/xbXJgPHiWo/OsOnaSmEsv9t6kt0oa3lffJ5SgcW kQGR4bt73m0UO8TjkXmUGzpP/qHe6i+h5RXASVWD1gB6gkudgwoOYFmYCminCchbs5mW 5Snw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723732596; x=1724337396; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kw/kMF2UrPFy/1Y87Dczx++p4s+nUe86BSQw9sw3PK8=; b=WenM5LfBEkh02l+2DH2ahBED3LDy51F8rdwVXatO3x+xszQCm/wBdaULnttn1pom1s W/VcpAxhPE+PNkRWPfC25/Fygb8zqVbIfpNzU240ux8N3yVDzaQFljBV6NKUszjiMTvb d7+5GO19Wb2ZoFl+6FNfzgujYiFidyn57fzD2QcYC3ERiSHMxMubV/PB2ENXQxZbJKrq 8U5JCY78yI4zueNZSsMUFpBA4Y25Jn4XbF0pbcPEHCpgjSLehV02wGgddjVBMjGIjJ8r aYxRRmunsBrMGSHKTPQ+uqTqxa0xYeERt1jk9Jlv3j3106fORkfmUr/5k8etSvf5POuj e3Uw== X-Gm-Message-State: AOJu0YxCVDOss2uDZDjD4I8nKvaJCSll5GPNomUhwh4PtLCIIrTvjkz6 HR16VMX0ID5uBi9oI1DF3wPLLAQN6zGSB+0hcD98okMKAqeqyddAxHDuMwyFrvJuPqIVgEtIWLt s X-Google-Smtp-Source: AGHT+IH+IJcPuQwYLYBiTxJK49qlzqTiCEGLtVwQJ/COobM/l80Xee7cQVq5/WJcUM4Fq8zAYCCt/g== X-Received: by 2002:a05:6000:4388:b0:371:83ae:809b with SMTP id ffacd0b85a97d-37183ae8285mr3118007f8f.4.1723732596272; Thu, 15 Aug 2024 07:36:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH for-9.2] accel/tcg: Remove dead code from rr_cpu_thread_fn() Date: Thu, 15 Aug 2024 15:36:34 +0100 Message-Id: <20240815143634.3413679-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723732658758116600 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Richard Henderson --- 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 48c38714bd6..38ab16244e3 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(); } =20 - rcu_remove_force_rcu_notifier(&force_rcu); - rcu_unregister_thread(); - return NULL; + g_assert_not_reached(); } =20 void rr_start_vcpu_thread(CPUState *cpu) --=20 2.34.1