Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1881266lql; Wed, 13 Mar 2024 10:39:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXXLUzE6wh66FyWz0Z27X2FFSheKrKNwwtXswQIO5XHymhjVRoQI/jhrCqOLBnw8acCEZPJKokck3BHDgrxwU4lXOel3B41VKuoJwMoJA== X-Google-Smtp-Source: AGHT+IF/7VXyIoMFWw49EbJFGdapDpCPcTDuaaRusuKyDt5I+HpMMPmnWrkwTEpXKBUctRkrHx7M X-Received: by 2002:a05:6e02:1567:b0:365:1e8e:9c6c with SMTP id k7-20020a056e02156700b003651e8e9c6cmr769535ilu.11.1710351546067; Wed, 13 Mar 2024 10:39:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710351546; cv=pass; d=google.com; s=arc-20160816; b=VJY9t6ExZlZZGIURuLMJEEixx0Ca/PqKgzvNPOy+ku5irdsS+uAlmHMVe62+LaQSyO 0fWMjPiwD0qTL2VvfqofIrxWJaT6jfPlurQ9qpNtuCy97JS++gfeN+niCQJfiyKzZTDm hcQg7tFxLOQmqAcrc3Mzlg0DsoG/+vL04seZ4HKALwWd7MlY+pMNzBrizND7Ij5GkECR OurwMjZsv7t8Is02bRgpjdPoTXVoayu3gyYpSzffr7TaqIafOiCukREAT0BJ/rv+/u6I VJDR+YM633QosUBqEbYTor5FmDzed1TLqGyrMkZrA18RQJyr6TJhh9jkdZMI2M05DTLy f1dA== 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=p7dnGJvYBN9Dmqbh85tiWlydP5ubUyz6e/9BDKK4xO4=; fh=UDybChT8th3KBBN/dtQlnvIe4LqqY5GN+FXyISH2BnE=; b=KD0aORC8ezk+iaWtovV1BmFaRnmDu3nq+DFiJdPS02T9aTQbFQJu/tcGvTAY1+/uoD 35MYghzra2y3RrHW2/bjT2a8/JjzTFzq6Hsb7YBSW5eC+YNsLYvOwOuDof5qqj4LdRbi SgwRVjqmN5/den4JahbAbcvMyjpfxbanCJx80vzYYzCCl8D/BZ5PpdcsCBLRwDwM1L09 sNzRZVguwAz1llk1XVm38tYLFtosIZjt7KQGxo4P0gsLuXwPjKQFcLBotllDcm41STF6 E0awt4FPfG6n6CUe1e4/xqQu/plMHzoR3I7IyrdFaEKEQlTDyb1eauVlvLNwjfGOjDT9 yR2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="met0NpR/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101957-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e5-20020a656885000000b005dc3e746573si9702248pgt.826.2024.03.13.10.39.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 10:39:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="met0NpR/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101957-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B55C8B22929 for ; Wed, 13 Mar 2024 17:25:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52EF113BAE2; Wed, 13 Mar 2024 16:42:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="met0NpR/" 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 79A0113AA39; Wed, 13 Mar 2024 16:42:46 +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=1710348166; cv=none; b=R7ZdY3KdFUgApDbMH2wA6r/CEI6ISYyEQJBJrl0XJayTKYrEL/ln4sVRHSMPLLaecgJNlaaEa3nyym+z+m11kKw+mJfqPGg6e770QYvlY0crCH9vG7MagqMEBsnHnhrWA1yWpbEYhUiYBCUr2xASYqukdEizxy47wxnnhebyDP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348166; c=relaxed/simple; bh=8EiflNOk+oftE/DLdH6Lfvnb/5Rj6PubTRnwm9TnOBo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HVGRs1lMIMG2xEnYppvSzDipyfsndtsaXqxFe+Tr6BlYNWk8cIJUms/Ph9aYPEQt+bq/U/FDEYmPrwVtlcRnVW31K/IrV7HydCvPh5xeNBEb4BoFtnPMX6yFJcAAGTDoNvHOEyU0iMmcfy/mlXs+PW+fn4Z73GgFNRz6zXpsuIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=met0NpR/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CD8FC43394; Wed, 13 Mar 2024 16:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710348166; bh=8EiflNOk+oftE/DLdH6Lfvnb/5Rj6PubTRnwm9TnOBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=met0NpR/CQ+bUeFa6h/GyzlyFuripGAZ3tUGPKWgtZpLwB/aNyvinRPjZYnqJChwb eo7pb3UfQdUAGk3XyO2XvklxsW6z1F5TUgEASubhK6C6NAgZyEn+I1oaatqbdeF5P7 yv/46Ud74XAe7ua2ruQAOA5rqlvo13YLfv/sbcrrgmeVZsVk3jtaMHr7cTvyQGe2Ta jF3rbvWJGQXQ1jE/FH+8FMQ8oVK/623LZWHD7foAWlnf7kQWAXRID2ktlxO/tftDLw APsh5oum8A6QVLcOrkR3dWb/bLuXMrlT47BO88iQmoyysbYojkjd62rIM/MuLAfbMW tR+qHKbbjPEtg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jason Xing , Paolo Abeni , Sasha Levin Subject: [PATCH 5.15 17/76] netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser Date: Wed, 13 Mar 2024 12:41:24 -0400 Message-ID: <20240313164223.615640-18-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313164223.615640-1-sashal@kernel.org> References: <20240313164223.615640-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.15.152-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.15.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.15.152-rc1 X-KernelTest-Deadline: 2024-03-15T16:42+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 55cd51977fbc2..e5d24462d5100 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 != 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