From nobody Mon Feb 9 01:45:03 2026 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 1E5C971740; Wed, 13 Mar 2024 16:37:58 +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=1710347878; cv=none; b=dJNEI82U1XPhcjVUbuzgaDOao1GIKddoEEGwXJiACKoexwv/gREFaWAFRxJfjOA5L9TOTEnAfYBuDNgkvCYDZHqNUO+7RDOPZoD/cRjOoMlHvjeVG9nvaopgOHY2rJoS+a210ClTJ6FvIoy9YBRbZ22lGWTJoL/EFAcPH4+7A4Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347878; c=relaxed/simple; bh=zoz/s8A/E4JPfDEwpZXOOhtjTptdKp3RunG4UOVpAz4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fUW5Zv3Mb+hyBHMMNvXIRfa35WtJj3PY1dl6Hll8eJcheISTfjsO77XbT3dIwssJL0+HP6P8n+Ij7rgplJVbYMQTiah+rLSnQafb6zlXL1a1ugRjSO0OmpRXEG0h3KMg6EL4qyCOOmUObTZtWsUbNxbE/FzSjvIMQ1q//VuaJB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FQFfbLNZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FQFfbLNZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 439F8C433C7; Wed, 13 Mar 2024 16:37:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347878; bh=zoz/s8A/E4JPfDEwpZXOOhtjTptdKp3RunG4UOVpAz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQFfbLNZbfmuthY4IdzwQExQ0HALlUnRtQutUU1PbPKv4yHi5vyP9yuJt/+q2reFx 2RfGL6jlIJDfk4LJ2tnrup+B5CnwNgnYKwMv2P2gpayXGJk8YsfgZExVv0Bo+Zn142 0jnsUElA2DzksF4peBjvFrkNFc/BL0TO+O+0317I7TmidjEnyr3Hew69+y9XujT9WI iWqwWzHgNqlTR/ZW01Zad6v5xx6ywQLCEttmpDZw/4bC24tDFaQQE7tm2QIiZrsEIa BXhAHrZAi7OgiI9IF90oZLrqmopbtCZT8S6eoxuE/sQJPnt/WJ7Akccv6UUs3WHU5g atA6vLYjRhwVg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jason Xing , Paolo Abeni , Sasha Levin Subject: [PATCH 6.6 39/60] netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser Date: Wed, 13 Mar 2024 12:36:46 -0400 Message-ID: <20240313163707.615000-40-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163707.615000-1-sashal@kernel.org> References: <20240313163707.615000-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/v6.x/stable-review/patch-6.6.22-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.6.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.6.22-rc1 X-KernelTest-Deadline: 2024-03-15T16:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 6f709fdffc11f..b8ddd8048f352 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -766,7 +766,7 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) if (ax25 !=3D NULL) { ret =3D 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; } --=20 2.43.0