From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 C806A125DB for ; Thu, 7 Sep 2023 19:40:15 +0000 (UTC) Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 255441BD0 for ; Thu, 7 Sep 2023 12:40:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 93CC720860; Thu, 7 Sep 2023 12:03:46 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uJcI929LY2R3; Thu, 7 Sep 2023 12:03:45 +0200 (CEST) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id EBDB42085A; Thu, 7 Sep 2023 12:03:45 +0200 (CEST) Received: from cas-essen-02.secunet.de (unknown [10.53.40.202]) by mailout1.secunet.com (Postfix) with ESMTP id E57D180004A; Thu, 7 Sep 2023 12:03:45 +0200 (CEST) Received: from mbx-essen-02.secunet.de (10.53.40.198) by cas-essen-02.secunet.de (10.53.40.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 7 Sep 2023 12:03:45 +0200 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-02.secunet.de (10.53.40.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 7 Sep 2023 12:03:45 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 33BD23182CBA; Thu, 7 Sep 2023 12:03:45 +0200 (CEST) Date: Thu, 7 Sep 2023 12:03:45 +0200 From: Steffen Klassert To: Eric Dumazet CC: "David S . Miller" , Jakub Kicinski , Paolo Abeni , , , syzbot Subject: Re: [PATCH net] xfrm: interface: use DEV_STATS_INC() Message-ID: References: <20230905132303.1927206-1-edumazet@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230905132303.1927206-1-edumazet@google.com> X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-02.secunet.de (10.53.40.198) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Tue, Sep 05, 2023 at 01:23:03PM +0000, Eric Dumazet wrote: > syzbot/KCSAN reported data-races in xfrm whenever dev->stats fields > are updated. > > It appears all of these updates can happen from multiple cpus. > > Adopt SMP safe DEV_STATS_INC() to update dev->stats fields. > > BUG: KCSAN: data-race in xfrmi_xmit / xfrmi_xmit > ... > > Reported by Kernel Concurrency Sanitizer on: > CPU: 0 PID: 23987 Comm: syz-executor.5 Not tainted 6.5.0-syzkaller-10885-g0468be89b3fa #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 > > Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") > Reported-by: syzbot > Signed-off-by: Eric Dumazet > Cc: Steffen Klassert Applied to the ipsec tree, thanks Eric!