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 X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF14AC433E0 for ; Fri, 12 Mar 2021 09:59:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A927C64FC9 for ; Fri, 12 Mar 2021 09:59:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233555AbhCLJ6t (ORCPT ); Fri, 12 Mar 2021 04:58:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:54076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbhCLJ6l (ORCPT ); Fri, 12 Mar 2021 04:58:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D7EC764F00; Fri, 12 Mar 2021 09:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615542691; bh=YlsEYrZ94YD7S2juhHhixfEf4CmyjxepGm1iYQM/AFc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=urvbU/P3yusDJ54thsdajUoIRyd/5VHkpaK9tlp0pob6b8UdG12cr9sLQo9fwBnm5 WdQVLhu7po5B3c7lUQ1bCw1SIa7+3Kmj2YzcLCkwkEohQyPSy2JXeQZAlfio7WMOHJ h6C/jyRyzTwMpuSKnPtS2KO95ATiEbdUSUgTsgic= Date: Fri, 12 Mar 2021 10:51:25 +0100 From: Greg Kroah-Hartman To: Eric Dumazet Cc: "David S . Miller" , netdev , Eric Dumazet , stable@vger.kernel.org Subject: Re: [PATCH 4.19-stable 1/3] tcp: annotate tp->copied_seq lockless reads Message-ID: References: <20210312083323.3720479-1-eric.dumazet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210312083323.3720479-1-eric.dumazet@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Mar 12, 2021 at 12:33:21AM -0800, Eric Dumazet wrote: > From: Eric Dumazet > > [ Upstream commit 7db48e983930285b765743ebd665aecf9850582b ] > > There are few places where we fetch tp->copied_seq while > this field can change from IRQ or other cpu. > > We need to add READ_ONCE() annotations, and also make > sure write sides use corresponding WRITE_ONCE() to avoid > store-tearing. > > Note that tcp_inq_hint() was already using READ_ONCE(tp->copied_seq) > > Signed-off-by: Eric Dumazet > Signed-off-by: David S. Miller All now queued up, thanks! greg k-h