From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D0C5C001DE for ; Wed, 9 Aug 2023 11:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233147AbjHILYw (ORCPT ); Wed, 9 Aug 2023 07:24:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233672AbjHILYv (ORCPT ); Wed, 9 Aug 2023 07:24:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2232819A1 for ; Wed, 9 Aug 2023 04:24:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AAAD963250 for ; Wed, 9 Aug 2023 11:24:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8F15C433C7; Wed, 9 Aug 2023 11:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691580290; bh=HeK5GxO+uAoeGEp0zl9W9EPYge1CgkH/9avWRfCvRl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PczPYnSbldgoUpRjopiGHlG7EdLjJVLeXqUvIb3ahqU/m4sNMVUj2obgK1KNekOBd IjtfaG3uONC/C9LN+MJ88jFy8OtGMpwaEdK/fKp8/1JZ20ddMUtArhwdDl70AuxMq3 1lCCQO6jsNz3CS1KNnV8uWib9D7BEkH5E7Zq3pVs= 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.19 295/323] net: add missing data-race annotation for sk_ll_usec Date: Wed, 9 Aug 2023 12:42:13 +0200 Message-ID: <20230809103711.563595137@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809103658.104386911@linuxfoundation.org> References: <20230809103658.104386911@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 f112862fe0682..3e6da3694a5a5 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1349,7 +1349,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