From mboxrd@z Thu Jan 1 00:00:00 1970 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 8A37C17AA6 for ; Wed, 9 Aug 2023 11:10:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EFD6C433C7; Wed, 9 Aug 2023 11:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691579408; bh=j0YQz9AIiVhJO/AanZ5uQmh8cSP2OegfTpjz5CJFV1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YXdkFv6euiv3s/7J9SJ+Oa3ZSvM2tqyP/xn5Q8ZuSq92DvaVBf5JFR1fCurztyWt4 n1QtOE69Jgyr62kVaLzOmcQdpcDRZ3MvXMbfjr4LcMNPZ23n+WBU2OX9mIEWrd/60O 69bXBgVZ7a351UhYyMjL8izSVVAgiKidLYvkLsVo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Eric Dumazet , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 186/204] net: add missing data-race annotation for sk_ll_usec Date: Wed, 9 Aug 2023 12:42:04 +0200 Message-ID: <20230809103648.711202702@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809103642.552405807@linuxfoundation.org> References: <20230809103642.552405807@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Eric Dumazet [ Upstream commit e5f0d2dd3c2faa671711dac6d3ff3cef307bcfe3 ] In a prior commit I forgot that sk_getsockopt() reads sk->sk_ll_usec without holding a lock. Fixes: 0dbffbb5335a ("net: annotate data race around sk_ll_usec") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/core/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/sock.c b/net/core/sock.c index d938b7f2bac32..0ff80718f194d 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1359,7 +1359,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, #ifdef CONFIG_NET_RX_BUSY_POLL case SO_BUSY_POLL: - v.val = sk->sk_ll_usec; + v.val = READ_ONCE(sk->sk_ll_usec); break; #endif -- 2.40.1