Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1848302lql; Wed, 13 Mar 2024 09:43:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDCr4+y18gtLISTLXKOHx2Q/fD9QSUIFtM3E7gjGKmZF49iwyWTWU8nWIdEITedQf37WcHQ00lmzmJThYse17yorzVOXGG6s/tb2mRew== X-Google-Smtp-Source: AGHT+IEZut7NcgKUK0NBMfgANV0/2CMQ5CuJ5G4K1Km864VY/8mkrxPJs+7y3G7058OTf4sUV2Ka X-Received: by 2002:aca:1916:0:b0:3c1:e05f:d2ab with SMTP id l22-20020aca1916000000b003c1e05fd2abmr294194oii.57.1710348238543; Wed, 13 Mar 2024 09:43:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710348238; cv=pass; d=google.com; s=arc-20160816; b=WK0NKhBytLsWgP33gaYuqOKxlLbqLNHOi5oNcmiZ4MjiHUdDxj70WO/zoSlsTycxj1 MDDz33QEwrKypM0UBvwu5YOqq+vg8d3aTGJySv/s/rb8gRCZtoO01UWwmrxQPz1VsXUV 6FOq7Hv7d40AAaB6xgC/J+481nDdbR5apoF/cF1qLqHyOI7YgbPMk3+ipwx2poac+dIt Ep1EISSGQneS2zFfNI4/ILoDV7MRoPrONjRanuXhx/fMFeRP1rS6ocaRCLkxKg2TaQec vJ409WxkRJ1fI6vG2L3YSJacyUk0FlkY3KNuzhoBwYJxVzVDGgu07EfvGX/hom+ewMqP cKTw== 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=3E+f/8d0iOmMeS0r3oPgUGpvfRiT9d/f5ExmQH8rSMg=; fh=UDybChT8th3KBBN/dtQlnvIe4LqqY5GN+FXyISH2BnE=; b=K0bzC48jWsmdK0dH1V8Di+YKe0/AqUasYUxp6kBiNQmjfakVh9qBDwI5Hw8POlHVwy xgC3HYkGXFiLzzf8NgPLbTCzmm5m19q7ACLOZkBd/HqStyQSJXYlLGFOkKGV1FWA1mR/ cfqIwWqTn3Xi0dPIemecs7aW9ukLTm/qsqworzfI39VBIpx5eNdjlY22phb5hiV1Gql/ Bl33n6dID66COWR/Pkrud058QfdcEI0uXm/k1d5m6Q9+zQfU9yJIZ23RWIdcNYjrHr0C /+p0quHgqS+DoUPg1bZuTPx4A+NorCw7kEnzTHonkJDbMnrYUtbErjbr6CzFYXAhVF91 J04g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LHLKq9th; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101787-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j1-20020a05620a288100b007883231ca49si10066649qkp.130.2024.03.13.09.43.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:43:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101787-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LHLKq9th; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101787-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101787-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4470B1C20809 for ; Wed, 13 Mar 2024 16:43:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 294EA524DF; Wed, 13 Mar 2024 16:33:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LHLKq9th" 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 4C6556518E; Wed, 13 Mar 2024 16:33:41 +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=1710347622; cv=none; b=G/Ju/XtB6cVLSutpy8QCnEhY6Nu5KxVBe6D1jztajCsIMP5Bf3McP+pPSTR/DmlOOohHYjcHk20rsQ40ptfCJXpbBiu2czvjOcMHap+mC0OxsXx1aQPLrIR9ncE+kN/OGu4A4fmKXvvipya//6ixVpDG4A7ghrTRMXwdyudur98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347622; c=relaxed/simple; bh=50cYx1tS1wHW2mJ/yB8+DCwD4D+TAt8HjU5iUpgnBss=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PLW3Omxjcbcak9P+fKe/JHVBB4mGadkxLg42lrYMRpgI9JJV3RmWXj84cY/EZbezRUu0Eosv0aZqiAWcDumjSPbO379D0N5PCTZLyGi58kJuPE3eXYlbqxqjdOkcOgDFc5r+19YXuI+Xc5E7opVXedlMLeykQlsAm6SfMOUADJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LHLKq9th; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1841C43390; Wed, 13 Mar 2024 16:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710347621; bh=50cYx1tS1wHW2mJ/yB8+DCwD4D+TAt8HjU5iUpgnBss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LHLKq9thMhoJtRlr5lFmtd9OEF7rwc4xxBxx66dAG7bX3KOEKrfiVnLVwUqbkywxo CnNe88yxSFtqq0Qmu3UtoXR+gsSAWPWtr+abSX1PxQRUW/eKGgIKYpAyes++31rbEh WCVYDZCqdqUY+W5qPJnEhdVZNFcklINiVkcs5b8Rouaov9YvtXscx3GLGiQOUQQva+ Cr6DsD8EoMkNoQFk2CRfKD4Ksdqh5BisI75Hw6cHHgAqZCyF7Pq3cJRRWjYWYNKmr3 vrjU8ae8Qk7vt2Uj+th7EKRp7DIbBbS9pTHRITuz11BabB0FaJFMYjVGgDnkiz9wac ojlABnARGeLMQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jason Xing , Paolo Abeni , Sasha Levin Subject: [PATCH 6.7 48/61] netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay Date: Wed, 13 Mar 2024 12:32:23 -0400 Message-ID: <20240313163236.613880-49-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313163236.613880-1-sashal@kernel.org> References: <20240313163236.613880-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.7.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-6.7.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 6.7.10-rc1 X-KernelTest-Deadline: 2024-03-15T16:32+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jason Xing [ Upstream commit 806f462ba9029d41aadf8ec93f2f99c5305deada ] 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/af_netrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 312fc745db7ff..8ada0da3c0e08 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -455,7 +455,7 @@ static int nr_create(struct net *net, struct socket *sock, int protocol, nr->t1 = msecs_to_jiffies(READ_ONCE(sysctl_netrom_transport_timeout)); nr->t2 = - msecs_to_jiffies(sysctl_netrom_transport_acknowledge_delay); + msecs_to_jiffies(READ_ONCE(sysctl_netrom_transport_acknowledge_delay)); nr->n2 = msecs_to_jiffies(READ_ONCE(sysctl_netrom_transport_maximum_tries)); nr->t4 = -- 2.43.0