From patchwork Tue Jan 10 17:39:15 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: 640877 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2863404pvb; Tue, 10 Jan 2023 10:47:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXt/Hlp6tj9FJXZF5He6IUtGtjjijPxT4NMA8yB6FXUYqUI3Td0PVAWV1GEcPRyVemXJEF1c X-Received: by 2002:a05:622a:22a3:b0:3a9:6b48:a13c with SMTP id ay35-20020a05622a22a300b003a96b48a13cmr94066061qtb.51.1673376453543; Tue, 10 Jan 2023 10:47:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673376453; cv=none; d=google.com; s=arc-20160816; b=FPVFPHBZsiqwyTaKVXmEUmfFvhndgnhHIEsewC40lGEpywFfcH2NtgyMk0ofM9fdRJ WUh7Y9Q2yaCk27fGFJsbRNmYw/RHXOpZLYbHx3N2iIpuI6zAT4hpfr/dePLen1s1A507 qnODy2K/u3OyuYG/g4SEML+FeeyHwVw1uZEvukd6cbYwn9JvZgv2dt3lt35zAAryQimo SGowkMYPagAC6923++oBYWdUsom+1DWOKN2Q6+SVEjS+HnPgFEeUgJ3lXADJ3t+omjTn RWa0hjY10f5flH1t2XowQXRcRiUB8UMFI6lSsmH+MUxRpQSff/EicxteOG7MjxrlGFE9 LuYQ== 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=MXFxyJRI2iR/xunMULJui4KM0BQsyU2Vc+mAIPXoOSM=; b=f6z1DEYCFNp1qot+/qJWxiijBbTKC5OV0rvcnIUYnXXqu4+MZ3Yn9c0s4Gbt7lB3pF v0jQuR9mIrXavb9jMLL7hrnGZITP/1Sf2G7bNqW4XFM9DYzYowKotbHsF/6stalfKS67 N2Dl1BkiAk7T6jmeYPg+DGrfISz+hPGh/etDISGFcFV00emz+kpL1XCBHj5R3JSDkL0S ZqYsMY4pWiHfPT7W0wTVq+Zvg2JVLCTeS7CMpbfol09vuqrNxEDv9yiaDcYLdxag3+I9 fFss1ltVM8QZRjUZQSG7PTIDqoOn2yK/zHsSbdzGLjwO1dKpYFiNgnehnweTRr4zFU9R SA+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q9FXpp+L; 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 ESMTP id w10-20020ac8718a000000b003a691a3eebesi6567130qto.257.2023.01.10.10.47.33 for ; Tue, 10 Jan 2023 10:47:33 -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=Q9FXpp+L; 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 1pFIb7-0003Wt-3L; Tue, 10 Jan 2023 12:39:41 -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 1pFIb4-0003UX-V7 for qemu-devel@nongnu.org; Tue, 10 Jan 2023 12:39:38 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFIb1-0001Gh-5H for qemu-devel@nongnu.org; Tue, 10 Jan 2023 12:39:38 -0500 Received: by mail-wr1-x430.google.com with SMTP id v2so1584590wrw.10 for ; Tue, 10 Jan 2023 09:39:34 -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=MXFxyJRI2iR/xunMULJui4KM0BQsyU2Vc+mAIPXoOSM=; b=Q9FXpp+LMQLJXSxBjuap6LoOG11HDSKTDs6+gotY7/qiJySt0pxepIoHKpTXpHATP3 GIhv1cqEb5DmeWuCJY8rMbHJLGYDwiR2f1QSRSYmvRVqDd9vuy0jpBQarZs9y08S6Yq5 IkUOnHntASQRzK7T6vy6Y/WdZodftWcE1BoBguvw2r+qHCMxj61U5gYbZpA5MNMwfjGe Ib1obRxtofIpx+AxcsOO9ClJk9TyZfehlgsBX2uaNWM+sPewF406WU7z/L18vSBupsGm 8460NuVzrAG3yYegyMpNxDbusLAs+E++okQIwz1/8+bbezPGlVHq/mjCwsf3Vx5VyAX2 R7tg== 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=MXFxyJRI2iR/xunMULJui4KM0BQsyU2Vc+mAIPXoOSM=; b=dhbfIqKdLWEOrSQGMWnegzVwrQgXYg6IjLkJDwXxd1zzqevas0JWRUtCF4G7u2iRF1 fs7kfNpqIgrbhkJpE0CtxW4CTu8+rOJvF9gKH66ZF6bNmr9mrmV48wscwrGD3nfrr4Ev 22RBibncg09dC3hCTZbOIGCbvIOuhlaJsFZAGIqVRQIzwV1iBF8bDQELbBakfLYOaE0p zQDSPVbxzPT54PZZu6I8y4GiEhf/nBSvDgZKm7R8pgOFKVSjBZCI+wmwhQS44YH/o+AS E1Mn9Gg/b8oY8EIS2NNKx8pCAb+PbZEgR5+QaiwehdyHoGEN4KQ2xqllygwB6fE7bxaC aDkA== X-Gm-Message-State: AFqh2kqjk+YTsxmUQT9OTsXi4ctefxz7ybmIsBKYqQS+mHgAUjKMvGpH xdlJqcXZZEhCjlIvInbaR1lGlQ== X-Received: by 2002:a05:6000:705:b0:273:7d1b:7337 with SMTP id bs5-20020a056000070500b002737d1b7337mr40397725wrb.7.1673372373543; Tue, 10 Jan 2023 09:39:33 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id r10-20020adfda4a000000b0029a06f11022sm11796931wrl.112.2023.01.10.09.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 09:39:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5EBC61FFBB; Tue, 10 Jan 2023 17:39:25 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Alexandre Iooss , Beraldo Leal , Thomas Huth , John Snow , Eduardo Habkost , Elena Ufimtseva , Ed Maste , Yanan Wang , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Li-Wen Hsu , Markus Armbruster , Jagannathan Raman , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Michael Roth , Wainer dos Santos Moschetta , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-arm@nongnu.org, Marcel Apfelbaum , Peter Maydell , Paolo Bonzini , Mahmoud Mandour , John G Johnson , Emilio Cota Subject: [PATCH 19/26] util/qht: add missing atomic_set(hashes[i]) Date: Tue, 10 Jan 2023 17:39:15 +0000 Message-Id: <20230110173922.265055-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230110173922.265055-1-alex.bennee@linaro.org> References: <20230110173922.265055-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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é Signed-off-by: Emilio Cota Reviewed-by: Alex Bennée Message-Id: <20230109224954.161672-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; }