Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp766412lqb; Fri, 24 May 2024 12:27:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhWTYR6zgJHEc9f2eKaYfNqAWSzYa2K4Ci1cK1kGW0qiAA5BV8QBBdr5EstyLqciS+dWp/JImH/lWx6oc7BiWevYLfQAD6dppErHWR0g== X-Google-Smtp-Source: AGHT+IHT02mYKZ8i8lGHLtvDxyVNNchGoemqC8D6WAfnpglOqRNKSGKGbClacwR+U2ejDPaK6MWS X-Received: by 2002:a05:6a00:1d1f:b0:6f8:ec5b:69ea with SMTP id d2e1a72fcca58-6f8f3185583mr3997116b3a.15.1716578821807; Fri, 24 May 2024 12:27:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716578821; cv=pass; d=google.com; s=arc-20160816; b=EEzL1DmSJMd99TWPUYJLbchK/elA737rL2MF48Uly28rtBgOtC2YZc83YMzQTKoc7A UvOzVe5LoI8v6WgUqEqU0cva9oatJgji2ya1Pr2f/NzeKEy5+cX7w+fi36nlqfeBHALD mdH5B/jtSedsgSWiqQFgLQyZkXHmcuOJypnNIiTRQD/UDvah3/t567tFp1XH19/9lKBh UBme8AJMupSK66paV6WBfpzhaTCYqH58l1h1HzJ9lk3wu7vPWnzYMDRg4x86BP78uup3 0cWMmkpb1Vb/hViXWBrdZI2DnHMb329UUIF8V9AE8z3miVbnUkEx43EL+iu5n/jPPScT 6QUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=G5i5L+hfuZyIpGJR1gtPKtKkb1VD3m9VEiDvJIPGdNw=; fh=kyFzMs43084lOFmzNh7Ln/K9pSZT7AiBzFDe7YvXjIY=; b=N/EFWS6H43qUJCSk5dqNTNxuAeOMg2uoH9aCYsInEs/wKHqhlxy80221zICnIwCuz3 BUv2o/lmaabRKPIkDgM9AGgtA5TzzHfpe5NxWUsOMNrcaiPLFof8QqDTZP4MteM1kpLg kqT11oVwkqT5YCnB9321J+u3cmaDAHeT4PLhZpAo2qOhi4PqM/TbG/QV9ps966wVG1Rw MDwGPu+MKztDiPktYHNU7rG1BjActqX5AejmvFRpsln3Jmnhkz5vR2UxqXoD9lO/mzy3 SXU/wu2gn05rDFQNnzaXpWCUjFoZFrOaWERixlU0k7xwt1ZloCae4yDb73aUR+DAt7Hl n69A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KRje6Bgk; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-189044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-68228db0a91si1750388a12.564.2024.05.24.12.27.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 12:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KRje6Bgk; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-189044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4DC0CB20EED for ; Fri, 24 May 2024 19:26:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE3A357C8A; Fri, 24 May 2024 19:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KRje6Bgk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WfH3Uryk" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 782CA50263 for ; Fri, 24 May 2024 19:26:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716578781; cv=none; b=HQ6psGF3eADybbPxJJieTeW7PvwlXyvsTH3PuamRjUnVK4p0BErp1LkuqoeksghfFrlgMIJ+edXiNYDsCGG39NW5PVAUFfzR2pGV9N+NghPzrUcdEE6jxoJ4zrn4CPMKtdVmDnSgGJkUBKubtT50bQ3d10qj3azCKe/rkIWKMwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716578781; c=relaxed/simple; bh=P73nN7b0ZF5GDD8McawvIj57MLNCTvFxZ02b3XMg3qA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=s4YUridyT2vRacgQQDjkYpuzm1SEi9Pk1z9OehTyfGD2t2+BUTefsJlhuqjI636lyu+6M+NR0o6gP6YYST4zVQs1H1HuMUJZyv6OmuvIm4tW37oSYkPos4Fucu9BoKgi4V4IOBOqRS0XQodE7CLKzg7V4+RVzPu64iMa6kgo3jk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KRje6Bgk; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WfH3Uryk; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716578778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G5i5L+hfuZyIpGJR1gtPKtKkb1VD3m9VEiDvJIPGdNw=; b=KRje6BgkmpNSc9bG6Mnn5DIxlZXhWleNqf+DL90RUGmZrGmznNplpNafssatOnFWbjzBCo WWgLHWOKN5nFl6iS/MNa5S4EuB3WI9mRpNTOThAkw7hYgXtD2uCW692ptJHjq2CsuZNY21 IyJ8nE2WKTnp3a40gTqGUhh82N5A36dfqWSxg1nZdI/gNR3T0hXP3T6XpFsHXLl8oDpc39 N2NrURPMQQDNs3/TC0y0NImGKUWEa3/NjrEsfZwDBBj4YhSfZorG+ZA4LPCQP/mVCzJKSD mXpU3Dt4NE0KSAvf8zKriwWAhlNA34FODlTcqHfiYQaKGur3Cg0QNseKP+nzzA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716578778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G5i5L+hfuZyIpGJR1gtPKtKkb1VD3m9VEiDvJIPGdNw=; b=WfH3Uryk8PZSdlT5dlxLSlPzwYJXKGQwgnUk3LcSO01o+soanFc6Vo9eJOxm8EJo4si8lF 1IRY9Iuzp5A7AlDw== To: Breno Leitao , Andrew Morton Cc: paulmck@kernel.org, "open list:DEBUGOBJECTS:" Subject: Re: [PATCH] debugobjects: Fix potential data race in debug_objects_maxchain In-Reply-To: <20240509110612.768196-1-leitao@debian.org> References: <20240509110612.768196-1-leitao@debian.org> Date: Fri, 24 May 2024 21:26:17 +0200 Message-ID: <871q5rdnae.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, May 09 2024 at 04:06, Breno Leitao wrote: > - if (cnt > debug_objects_maxchain) > - debug_objects_maxchain = cnt; > + if (cnt > READ_ONCE(debug_objects_maxchain)) > + WRITE_ONCE(debug_objects_maxchain, cnt); The data race is actually harmless as this is just used for debugfs statistics. I'm pretty sure that the rest of these debug variables are racy as well. Can we please annotate all of them without waiting for KCSAN to detect them one by one? Thanks, tglx