From patchwork Wed Oct 11 10:33:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 731953 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp329762wrv; Wed, 11 Oct 2023 03:44:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqsL4zGUDk1zMaXM106sCojIRduNoxM/dXaskq1AiJ51dIfa57SCE5I8AxJBUdhaQ31WSR X-Received: by 2002:ac8:5a96:0:b0:419:52a9:9ffb with SMTP id c22-20020ac85a96000000b0041952a99ffbmr26126189qtc.20.1697021087794; Wed, 11 Oct 2023 03:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697021087; cv=none; d=google.com; s=arc-20160816; b=tkVBqqyQQPu9cR/DY0aZE9kd8ygbEszD3w8qntETBhpXv5sA8bl/6QXNUl3onkG5sm /2Kr8gbgpuTdV3vaD4GFWUK1xVUZrlTOoNqgPYdbTlDz31vnaxi5MbSXhR31+TAvRwJH eMxJC5qTB6CvV7Y87BkUte9ciw6APYjF2uFMgpTGPp9abIvTgvYAJYSZ4pn+ivrbAGaH jaJDm11ufljdpdaYdOM7pK+nAhwugWgC1jmWvucfMQmyg0hXLwdhrRLn972ITVArazYT DjSWnQBxqU80dyqGogsUhtpf3ldwVMeX8slnK9HGuY8xY533ru1zg8LKOIWBfJP/N7mO H2bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3iJ/Q4kLUmKoxSHeooZspyIFZM2wlJ6x5Q8adgv7bVI=; fh=MOgXiCNKOFQwr3hqCTX2grTRnIBGvMJ4nhNOMG8D9zI=; b=I6ih92SABqAx5oR0sEem0xr3UHCx4Ler9kqFlQYaUpqweRQJ8q0TSFfSBVlqyevVaW v8iYVNP4Y+Ao73zQLb5ifR7vo5TyJREUekllB6EXZ3G3udK4Kw8oyut80XJXCd2E526/ 9I0HmeV1n1YBVLFttEm6ZL3Pdpr6YZwGnwCK0GNkWXeg5tp/1YB+wlaW3sAI7NIYkPxE aZD9+07HI9vjXyiAB4FxPCTj9wxxjzxVRq796CTyoi8dnNHTtDeAKBfiJvxP3PbnIZpZ h8l2J8jIklVzuwsVLSkrLLq7d/J4G7XTFkTtFodHZ7UIwBKwQMreoOJMTJqZ6cBtd3JS D0rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KXDO/TWv"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d22-20020a05622a101600b00410a562b415si9296528qte.529.2023.10.11.03.44.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Oct 2023 03:44:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KXDO/TWv"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWgj-0008Aq-9o; Wed, 11 Oct 2023 06:43:37 -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 1qqWgi-00089h-7U for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:36 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWgf-0007ek-EB for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:43:35 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40572aeb73cso62265705e9.3 for ; Wed, 11 Oct 2023 03:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697021011; x=1697625811; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3iJ/Q4kLUmKoxSHeooZspyIFZM2wlJ6x5Q8adgv7bVI=; b=KXDO/TWvUMIEJSSVShYe4JA54qR6qOapaJJOHUCaqUzLWXerUNVUPnX6kbC7Q6D9vx RTt1rgEY+vfOhYnjG7quRbs786dccVibEODdbvcB33fFCXuSDu3HKUB16bj3BUv7w7p+ 3/lIsJMcaNxZ/v1PTotyyMnRLEcAbzRM5G0L+iaAebpUOb+gDF8uHm5vdHOxQzIuZIQp H56F0J/9ASQ5gGUDHPLAANbkHpJZOIzhSplVG5M2Rf8Fpc4sxW4jcWXGVilnT3V9+xC9 zff5XAUOvuWgmXGhwEvgMTNNS2amFFdXXrUBVn/w2oWcbZYSkCwTpFjqqDadi/IB5EFt zu7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021011; x=1697625811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3iJ/Q4kLUmKoxSHeooZspyIFZM2wlJ6x5Q8adgv7bVI=; b=qKUlrKQWxjMo5972E3D0+TlSb7NW+q1pRCJeJ0lX0tkK/IQwfORgKZOYIgx2xXTSnT C+yKpJ1pYU0CoYcnlHAbE6N0a3YUI8zhzZVbiB7KJhrZfB/DdaubVr6fmwaFVX4ocXQB fnK0cQmZqrBK7znexyq7a70eAsuWDrkOwsNY1CAI7a5abJ8o3DHPnCZczH3PEGLHLBo8 LXMmmqlgFjRC9uAFoOsBmmrQV46iZBqyFCeYv2Rm2qOds83sAcScLhzTXJwdGAhkZ7pg HyL2NtjNseV4mxf69FvPUJl9VbysqW+vIjIoMWeYljWC1Z5x2cLFBk0pgn+qnLkjPh+2 SpkA== X-Gm-Message-State: AOJu0YxCPOtoMVWe281Z0tg5Y/PLLr+FDEm1LfW0XV+LDxAab3grybwR NJ9P+GwkgMAKHInOaUf6uFFfdw== X-Received: by 2002:a05:600c:231a:b0:3fe:f667:4e4c with SMTP id 26-20020a05600c231a00b003fef6674e4cmr18428821wmo.12.1697021011102; Wed, 11 Oct 2023 03:43:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q5-20020a7bce85000000b0040596352951sm18871220wmj.5.2023.10.11.03.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:43:30 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D06BF1FFBF; Wed, 11 Oct 2023 11:33:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 25/25] contrib/plugins: fix coverity warning in hotblocks Date: Wed, 11 Oct 2023 11:33:29 +0100 Message-Id: <20231011103329.670525-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Coverity complains that we have an unbalance use of mutex leading to potential deadlocks. Fixes: CID 1519048 Fixes: a208ba09bd ("tests/plugin: add a hotblocks plugin") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-26-alex.bennee@linaro.org> diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 6b74d25fea..4de1b13494 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -69,8 +69,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) } g_list_free(it); - g_mutex_unlock(&lock); } + g_mutex_unlock(&lock); qemu_plugin_outs(report->str); }