Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7232718rwr; Tue, 25 Apr 2023 09:52:24 -0700 (PDT) X-Google-Smtp-Source: AKy350a0xH8RBgdL/rrjcbNiBKOkeLwUwYvMAE62RE9vDxW5voYHmirDwxxFCf7DP8uhttGvNnSG X-Received: by 2002:a17:902:b583:b0:1a8:bc5:4912 with SMTP id a3-20020a170902b58300b001a80bc54912mr16279965pls.52.1682441544096; Tue, 25 Apr 2023 09:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682441544; cv=none; d=google.com; s=arc-20160816; b=0cYRXvq5FenP3bo/ZKJa34/GmP3Qc/GfSZWE9JAnDF76Unro+9M7EbaExSWs5aZcUX ULu2KMsOs2LN6M5+XIsVr+TNdExd35BurmsTA7rTBwmw6u35KWBtnjOzIpJMA1P0Lslz M48+Bn8SRPj/G21gmcM3teJ0WVmWlfrsrb/82Lcv0L+S7a1UG6gqYKltEXyUjX3vs/2m 8Ct97Osuo0qDUejnqfJHU/Zgv/0Mlyb7f7NdPIv9lgQ4xrddadfu+gsk8UNTYNMoXcuZ UBR+37GNj9gBCqpElSvneaJ/Nq7yCAyeEutbNAnXxh1rRLGJWqMHqCiBP20SeJM+/Too F0qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=YpGWfUJ0YMTDR6T0J5WKJSYaJmv5JlIf/hIRBqTGkpI=; b=RIXzW5qFwrXU/I4rF1JqplRuZDfQhztO85UPz57Qi2SFCyC6yTXP2QOqT03JySOwIj SaIDJzW7FQVNMhzdu4P/TC7jaYEce//yDw1+TuiZVSMsgVSvfYRQVkYMY4tZEVYbOfzx kX0lM25/xmZX+j/X0sCf7n+IpgF+SEZxZnU3CHFJPZ+OjVdPgP1rnB5eq8QqT0x5uieN smtDH02rdmGhD9qfpULCdkH4mzP5stjtgBSBrrj5OTGVDmTDyI23A6x+jO+X7/BZbDeo vimNthxIcXVmFwkNEMXlv6Hsti5PfjdynOw4z4Xaymvp4zQXxwv2QmuWTrUSkCxd+7+I WqPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="PMo/9yMt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020a1709029a4700b001a24efe1f22si13512411plv.64.2023.04.25.09.52.12; Tue, 25 Apr 2023 09:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="PMo/9yMt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234606AbjDYQbU (ORCPT + 99 others); Tue, 25 Apr 2023 12:31:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234377AbjDYQbT (ORCPT ); Tue, 25 Apr 2023 12:31:19 -0400 X-Greylist: delayed 602 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 25 Apr 2023 09:31:18 PDT Received: from out-37.mta0.migadu.com (out-37.mta0.migadu.com [IPv6:2001:41d0:1004:224b::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D156483D0 for ; Tue, 25 Apr 2023 09:31:18 -0700 (PDT) Message-ID: <9f190e7d-81f8-6a19-2c40-efff3840a606@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682439674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YpGWfUJ0YMTDR6T0J5WKJSYaJmv5JlIf/hIRBqTGkpI=; b=PMo/9yMtGDKIqQ7sYIzXnOppoaZSJKvCyHyVHE9davobTWNYII+dKwAYm6jsx3kF/91nis VR82KqhI+A1pZ25lTUW9PkwIiqi4VywwMapKYyRib2o+g95YucgRL06ASKxiD1BaVGkkbq ztY9SZgzDD4kjrAPPMhZyr3ABVQ7ceQ= Date: Tue, 25 Apr 2023 09:21:08 -0700 MIME-Version: 1.0 Subject: Re: [syzbot] [bpf?] KCSAN: data-race in __bpf_lru_list_rotate / __htab_lru_percpu_map_update_elem (5) Content-Language: en-US To: Alexei Starovoitov Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, sdf@google.com, song@kernel.org, syzkaller-bugs@googlegroups.com, yhs@fb.com, syzbot References: <0000000000002d14f305fa241e67@google.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/25/23 8:08 AM, Alexei Starovoitov wrote: > Martin, > > > Please take a look at the trace below. > I think we just need to annotate bpf_lru_node_set_ref() with data_race(). > wdyt? Agreed. node->ref needs a data_race(). I will post a patch.