From patchwork Tue Jan 24 18:01:19 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: 646047 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp341726pvb; Tue, 24 Jan 2023 10:08:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4dE8cR4PvXBY3FKEhuKYfduuTHPiPFh1srBOnS3C5TVI6Jn7oxMvbANe/aBrNrU2cnA2A X-Received: by 2002:a05:6214:1881:b0:537:4c54:bb1b with SMTP id cx1-20020a056214188100b005374c54bb1bmr21283715qvb.25.1674583717940; Tue, 24 Jan 2023 10:08:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674583717; cv=none; d=google.com; s=arc-20160816; b=rJu1oJTPKNgUxMcE3Z5w+jYocehS9zQC66/qgRGxqIRAZiC0ILcijvCkiD/BPq1P9E 7mhQsEfaDlgw9XSwZ1uWVU8QvGuJ5jPdb3i616pThKfXQNIUsSKQpxAsreHLFXczo6kD p7EHVpJNfrx1tgvHGIJVRF9uxa9KJXnZkqgUyneNmON2SmA1nX3uKPNfef22/Rn1wXyZ lsSM7zqiV7dLNMHWMMUe49RFwX6tK/k4CUm/ntdtIw7QYt02mIB8dRNgpttMoB+gUNNE JBdJWxq8zgP4W58Pg1P4cYTk3gQCEbcY5TxPzB0+uwwaMWvrxqUYYZ5AfC7/HL4CEoRK 0w/A== 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=zLUEvU5bY0ExRO47bg7V9ZKZhkWcMmVUuADKI9X2kjc=; b=UYAQcbGKL1BUkq3KsZlF4tWb3Kd1gqnfqpTszprr/75HCwdl9qtbboDu0kBrgRyFVt zubNa0VEDNr20FyPF5IwlzBdEBEq7JY8xm1MhiIJzE0FxuAVKU7/mhH8UDUn7bIuzjDl 0+GHiHbRsAETFLFYwSaolbntaCFpQBR9xtpYNUjT+j7aR4iJ3B/lh74FVflWBynfKSBH /4H9j0XiKZmkpM5sOaD/tgiF/gQQKfQajATLoqLfPOPXnPZ+ZKKKkDrBVzwoZLsEY8bP vZdjKlCsPNcwFFmsj6Ghx5A1agHYp/s3x8gO3ZINajknXiGBUtJnE9p2qQMiG5B82yps oByQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KHeTK4rK; 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 m14-20020a05621402ae00b005354ca36ba3si2003093qvv.169.2023.01.24.10.08.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jan 2023 10:08:37 -0800 (PST) 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=KHeTK4rK; 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 1pKNhg-0005jW-A8; Tue, 24 Jan 2023 13:07:28 -0500 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 1pKNhP-0005BN-5D for qemu-devel@nongnu.org; Tue, 24 Jan 2023 13:07:13 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKNhJ-00076B-0A for qemu-devel@nongnu.org; Tue, 24 Jan 2023 13:07:10 -0500 Received: by mail-wm1-x32c.google.com with SMTP id f12-20020a7bc8cc000000b003daf6b2f9b9so13413424wml.3 for ; Tue, 24 Jan 2023 10:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=zLUEvU5bY0ExRO47bg7V9ZKZhkWcMmVUuADKI9X2kjc=; b=KHeTK4rKeezifMN4ixGaknuC7fJiy+yQLVgqTK6z0JMINmx1huEOakpOamFQRDzCI1 uFZLkY21O+3OKXUVnEwB+lxkj/ATAxnDyVnaiNGMZiEu/34ZxTLP7imdiHVsORh0NB8G xXCiRinCB9tHir7PYVl620Pof0RHgpWgfhwslqBkJ9Fl2Bs/2r6Ofrkr8X/F+zWleXzW hV/F2Mz1IB7SeX1OYWsqkTEiDnZpnkwOFLwljIAlOa96wocWlMxr5GcRFtATf17MP4uC JwL5NyOXqHbB1W2nfwHZDqhuhTY4DAawc6yu5kctbXflsVd2+ZrHAWOq5FSLLc0YVc/R hKKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=zLUEvU5bY0ExRO47bg7V9ZKZhkWcMmVUuADKI9X2kjc=; b=tMr8x/sIFiHpckISlWpyFGaZ/+GXWuPHTzP903N3gm3cA7ul98ZGeMs/Pp+I5/b3Bv zic9yrvrElou6FeLCY7BiRKTeU3qdtSN4wamrQkq4p+Ar76yIzMGlWIcGGG5qpHh3sJa 7341HFa/G7kFVk6TaHI7HkTL5UH8TwVcN8xe9h7+f4EvdmLuYE3HBeg+efoJBUMda2h+ 3L8iUaVMQHGzL1R6KClMKKO1MJgsI5QfmysECwBwK3xq0sfKtPxqAc2icG1n1aQvmhie 0Drl1aJqdfd7lIV7TYIkd2PB6kfFm6Hf0iRQ4SCes+zz6JZfKb7QE5HJhTYRyq2RGI0n POPg== X-Gm-Message-State: AFqh2koYuUZSpgoUrdIC1bWKqypic9EeCEUFJ1wAncok2N/Cp6GCYHR1 94U/Z5CAD5yHCFBzAX6XfQO1BQ== X-Received: by 2002:a05:600c:1c8b:b0:3d9:f492:f25f with SMTP id k11-20020a05600c1c8b00b003d9f492f25fmr28182942wms.16.1674583623629; Tue, 24 Jan 2023 10:07:03 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id a18-20020a056000101200b002be25db0b7bsm2469169wrx.10.2023.01.24.10.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 10:07:02 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E4D8F1FFCF; Tue, 24 Jan 2023 18:01:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Ed Maste , Thomas Huth , Alexandre Iooss , Markus Armbruster , Jagannathan Raman , John G Johnson , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Bandan Das , Elena Ufimtseva , Michael Roth , Eduardo Habkost , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Qiuhao Li , Stefan Hajnoczi , Alexander Bulekov , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow , Paolo Bonzini , Darren Kenny , qemu-arm@nongnu.org, Yanan Wang , Cleber Rosa , Wainer dos Santos Moschetta , Marcel Apfelbaum , Li-Wen Hsu , Peter Maydell , Emilio Cota Subject: [PATCH v2 27/35] util/qht: add missing atomic_set(hashes[i]) Date: Tue, 24 Jan 2023 18:01:19 +0000 Message-Id: <20230124180127.1881110-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230124180127.1881110-1-alex.bennee@linaro.org> References: <20230124180127.1881110-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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=unavailable 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 From: Emilio Cota We forgot to add this one in "a890643958 util/qht: atomically set b->hashes". Detected with tsan. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Emilio Cota Message-Id: <20230111151628.320011-3-cota@braap.org> Signed-off-by: Alex Bennée --- util/qht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qht.c b/util/qht.c index 065fc501f4..15866299e6 100644 --- a/util/qht.c +++ b/util/qht.c @@ -688,7 +688,7 @@ static inline void qht_bucket_remove_entry(struct qht_bucket *orig, int pos) int i; if (qht_entry_is_last(orig, pos)) { - orig->hashes[pos] = 0; + qatomic_set(&orig->hashes[pos], 0); qatomic_set(&orig->pointers[pos], NULL); return; }