From patchwork Thu Jan 26 11:22:42 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: 647116 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp188813pvb; Thu, 26 Jan 2023 03:32:14 -0800 (PST) X-Google-Smtp-Source: AK7set9hsdmDmwEXe4oPeC7ejKeGc7KnCJMi9K2RUF5yoOceLl6xnFTHiYMC0sFZIPQsoQG26I9t X-Received: by 2002:a05:6214:240e:b0:535:666b:b83f with SMTP id fv14-20020a056214240e00b00535666bb83fmr2249900qvb.20.1674732734352; Thu, 26 Jan 2023 03:32:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674732734; cv=none; d=google.com; s=arc-20160816; b=d75OJ/taEzbhRlzvog6Y/sBTsfugqWE7d+rnFeO+8O3guUHcXVcHSAtAaEhI5gtUen bmahfaWGNT/mQzuOBHaPL0goeMvTE5f82aXDGYbSg43G7nkpth8avkYaGrADXsdB/KCM F6G1+d0BZqd9hrmHQFGsCDFwo2l1sR3A2IZyWsHUesu07YOdjz7p9PQ6IgXc/V5Bd9ct oBV7iL0mzjgxktQfp+SWod1bDROOOg593r3+Ln2i4MFKhbiRwT6hTCNtGl9CbuX6cLmS DwTYvvjYmkde6ICyfqTnmd/OYFRMyjp/qr6uf2XXtUD2c9tXvXTlHY4lAdqQcWXQ44SK tUEw== 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=jTUlBPS+ypvgj+Fr1uUg74hvNf7AayGAJIZigzJMmFc=; b=rK4IfUxiwwLBl/pRpYRVcBGTUVMhMs2sDeFe02Wqt0fKIPSN58Hy67SYtz6N7jiTlg ozYOVGnMdH8koX8qyjlItEAbhTpFZICMmpqIWQC8FSAk7kezFDeC/r1d7GXgRaItdFTO 1DJx1kpRFKptyvELx9HhFatpEZU7vEObzHWPdLsM3Vu2r7ABmVwG6MmFd45DuifAFO0e SuzNOcqhFxigNw+BP+tZ6dwsSKKQMB6rMLPNgdw6UVOyskUNdsseOFKdwsti8PSBe7oq qEwGOWH0EniJgwAS+MJs07SnoHVFbIS77YiLzd7DSjIoJ/0Vmi91lOYD7e9LRdAL1m38 rTlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDd4nJmh; 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 i66-20020a378645000000b0070652170d25si726037qkd.647.2023.01.26.03.32.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Jan 2023 03:32:14 -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=YDd4nJmh; 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 1pL0UG-0005NR-10; Thu, 26 Jan 2023 06:32:12 -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 1pL0U6-0004XD-C0 for qemu-devel@nongnu.org; Thu, 26 Jan 2023 06:32:04 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pL0U2-0007n1-H2 for qemu-devel@nongnu.org; Thu, 26 Jan 2023 06:32:01 -0500 Received: by mail-wr1-x435.google.com with SMTP id m14so994588wrg.13 for ; Thu, 26 Jan 2023 03:31:58 -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=jTUlBPS+ypvgj+Fr1uUg74hvNf7AayGAJIZigzJMmFc=; b=YDd4nJmhodBtrQkwNZmG6FALc+gVwWZ6eqQwsJqz9bmYEEoR5P9BcdT+aKlDlM/bPw EK3e91/AJyf/emtaJHZ+SrOH38Zwxzlc8eXw8LwTynnYUe8F4cSr5LD7YQtNlE3iyyMd i6Gt3Hc7+i7oELp62ZndjrAVzh2J9E2f0yKfoJY0Te/ORgXyPGL6M8S1ze2c0imzODPA zkoYWYT37i2vU021t44ZG8hX09NFhuv7fDwxXzdRCJKrFHMCHd1bOrAcEyAj/nDxIG1c w2L7z36r4H1+ytsIIGomMXX0ZmwKEp7EDLfyasxz0BjghHea/YbgSslgMQKX2iG5NPVg u4rw== 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=jTUlBPS+ypvgj+Fr1uUg74hvNf7AayGAJIZigzJMmFc=; b=7DXYOb0Dcfu9s+9btwkr0mtHWo/krZtvofwgFV9Pe+b4P9D7ZPkSMrasS9/ej4qcop T6kjTHkKpyQFYO8BG901ivfG3tulFhpNxN5uvPhsl5lmJObiSA+Ymlp1RGZJyOH7Y7TJ ZgTzrJxaX5h/j/uJok795ATk8KiTCKNiFzbP1SLTTyYA6WWqgwAfRiii/KrE2kxtNTbn fWxohrDuapm6/UIWIc8U7dN1xvn/nDFKdr3KqMk7HRADnZ27Vz3ZBMUMEVH5E5I0/NIL eWI9nQDBx5bnkfHpLc+76iZHzw2WdmBVOuZFrZEDH1H7StDCy1v/eeM4XQROZNncmy8k t0gg== X-Gm-Message-State: AO0yUKUAxpx2mjEgHGxHAKc8EJisLKnL6ANnjvyeysXnBkrXaTXfr2kO LkYsaNfRe/wsQLH9HbMt3rPeeA== X-Received: by 2002:adf:e48c:0:b0:2bf:ae16:817c with SMTP id i12-20020adfe48c000000b002bfae16817cmr8787820wrm.29.1674732717120; Thu, 26 Jan 2023 03:31:57 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id a4-20020a056000100400b00286ad197346sm1027375wrx.70.2023.01.26.03.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 03:31:56 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9880F1FFCB; Thu, 26 Jan 2023 11:22:58 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Emilio Cota , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 27/35] util/qht: add missing atomic_set(hashes[i]) Date: Thu, 26 Jan 2023 11:22:42 +0000 Message-Id: <20230126112250.2584701-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126112250.2584701-1-alex.bennee@linaro.org> References: <20230126112250.2584701-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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 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 Message-Id: <20230124180127.1881110-28-alex.bennee@linaro.org> 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; }