Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1905379lql; Wed, 13 Mar 2024 11:23:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7n4yWIqQhPNf0rzlKb9nTwD/zmtJuZnHQIbxEI1uNUZLmpQ6KsPRmajDpcOTWkwcgHLOAmwym2rbZ2Go8uPPXG39rKslKNhOZ1BDdtw== X-Google-Smtp-Source: AGHT+IHs7j/ngFedFSahYmYkkNBzP6zUIKZm65sJto2no0CLsSUQ1vC22iqA437QfMf+3KyX+/Ht X-Received: by 2002:a17:906:cb88:b0:a46:65fd:969d with SMTP id mf8-20020a170906cb8800b00a4665fd969dmr865604ejb.71.1710354198047; Wed, 13 Mar 2024 11:23:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710354198; cv=pass; d=google.com; s=arc-20160816; b=KnOP/eP0wyB3nUWEd9GKmt4N7tYu8YEDJ/PtcH6fob2rmQpu7axq3NRHsnwdiALFwr nBZ7y8KOd5wBBq3eAjSUQ6kJOoea37zQiOe8f2lNBwNImnQB4w7TatEe7fNntk4aus+9 Qa3pp4dRmtfEFERROW46IxdcYzrWN/EBAInyYtSWPnnngOAHdKFvDb9cY1tXMRlx0hmp x3RHa3pwUeITx04g8vd1XeFecQ3W6nSWVygEBApGHZYoLbfSUg0zJK2GNf62950Lor5m mM6YsvRUGq4XfKLGGq1d3r6Eh4x1I/IMTsYMJsXG78haUFj0u0ABYNYiWi3kjtK/83JC 7wmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xJx/0wsDLXQEvV692i0y/zsRGbxqjU9OKW1F270biaw=; fh=UDybChT8th3KBBN/dtQlnvIe4LqqY5GN+FXyISH2BnE=; b=OcrbyID76cvWww/U8/GgQChE0AFBhzSn59uTFKsEJwEPVMqFtr1nXHmBwTymG9lN6R SWZDH3lqEAiPhtSxgv31JlY04pT8wVmnMURM9MIiNx5hJPKXDrezX0DVdbstzGRGqVxM eDaSrNgQWR9fZMZCJ2zBcnqcU4Bec2RvMQ9V9ZnZ7ZRVwzK+2fcbQEPW0WDfliozuHzY TkbMLSPKe4RLLUTm3TmEeM7hL6096zkk2SRQOs1Heoj2pc8UsVN3DYFNlJR9q1DmBkFj A5h8VOfNMHBsEWqK3djqtI9EbP+doM6to9MQh7o6ETLcjd3+ZgPUoYtnIRLeNSx1WuXs AoQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dkUb2R7m; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-102044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ka2-20020a170907990200b00a45ffd4c6c3si4599963ejc.895.2024.03.13.11.23.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 11:23:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dkUb2R7m; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-102044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1AE011F29D4A for ; Wed, 13 Mar 2024 17:45:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 556E71534E9; Wed, 13 Mar 2024 16:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dkUb2R7m" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6F4D3152E10; Wed, 13 Mar 2024 16:47:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348424; cv=none; b=qPA2G4ukEKsC1dV7T1OvtZ1gBGALI6QVAO+TRW+AiSArvH/3iXOZVPgfx+oildrahCsQtSZBvCqmhCzk5unP86lXcuEsmzOI5NJp5m0N9UYbZXlhgi+a2W4hnq3VneL3JE2UbNEfeZ03nN320CUmyFx82mn6NAjzVrnIDl4UvZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348424; c=relaxed/simple; bh=TrmtEXDQsycLad657XlqLSOoc3BGOMFxOoA9VKBrig4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BK7Nn34k6vH3sM3aWaYGtVFswjPvTo3a84xW4d81vpqknQc56xfZf7Fuw8oqDxOdbkZ/dFVMm+uXD5mLspjBBO0IOkOU5MhHW4gx214b5r/ZIyyFNZAzwBYMpmduPEiEK96HHIVN+yEcLiTaULTZ2d8XSC1J/Qocz9VXM7iopvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dkUb2R7m; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53569C433F1; Wed, 13 Mar 2024 16:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710348424; bh=TrmtEXDQsycLad657XlqLSOoc3BGOMFxOoA9VKBrig4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dkUb2R7mjLyfQ4Bt0EvzyDujS8CFncZHssXdn9x1oGp2lxE5VEfsZ9yEjBCtA3lnB wT50r432VRq+5TWa8URqUO7BKCn8vtphrutoMYOLp0mXicc7rOhaCwPjY8NTZxxeKq 5QnkajgAFHDzcOaW9qPbP2BtUr910N1+3x6RFVNeJn8NeeOIip3RAsT7Tn0STJvhCS 3pTMGW6hov38y2GTRJQyN2yUWqpIaL3ymWGgMTo7TaAUYTVN/J4VuREpgMbgPEQgYr anFPRSr8+C9h3MHbdszSWjvnAnJflMaeqkHXyv8DliT7xOICKG8i493s2a/PofT1qd 9PLUFFoRBnV9w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jason Xing , Paolo Abeni , Sasha Levin Subject: [PATCH 5.10 19/73] netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser Date: Wed, 13 Mar 2024 12:45:46 -0400 Message-ID: <20240313164640.616049-20-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313164640.616049-1-sashal@kernel.org> References: <20240313164640.616049-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.213-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.10.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.10.213-rc1 X-KernelTest-Deadline: 2024-03-15T16:46+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jason Xing [ Upstream commit cfd9f4a740f772298308b2e6070d2c744fb5cf79 ] We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/netrom/nr_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index 94c4d4554b9c7..8a5375e1dcc77 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -763,7 +763,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) if (ax25 != NULL) { ret = nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, ax25->ax25_dev->dev, 0, - sysctl_netrom_obsolescence_count_initialiser); + READ_ONCE(sysctl_netrom_obsolescence_count_initialiser)); if (ret) return ret; } -- 2.43.0