Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9156766rwl; Wed, 11 Jan 2023 02:07:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXvUGTibd17Xrq8FpxTv0roH59s6j0QWzxHRhYhFqJGdCx/gXQk7GrOlC7dtnOs7APFFDGGR X-Received: by 2002:a17:903:1305:b0:193:389d:ecc5 with SMTP id iy5-20020a170903130500b00193389decc5mr8570905plb.47.1673431626049; Wed, 11 Jan 2023 02:07:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673431626; cv=none; d=google.com; s=arc-20160816; b=YZsFK3nFSDsnNnjYFSI9n0szBz1ug3v13JtKoHEja2ohuxiBZlIAALd+FFxWUFoOFW VlRRATsUwSzIcEAubwN0M0ecVCSm2QRXpi6phnQIrun6jBxH9G1K+KARbbNcKWOm+SNV ptauoifcj53lpACMzvmFY0kIBsG1hN8U0uF+RvKXIawLgovoIbZ5a7NuBvQUu5Cu5NMh FBhNMUtvvdwCpLtRlhBF2vRwxLdxbbiAQmljRm2eADlL7W6BTI2qtMwrr/55+Tl+ua6z mLLaXIefkZTzC0Gm6bWlkUycCzUify9+N/rDoxNm6SWo5531/6TwgLnS2ukMuV3hkL2R APNA== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9d05befG0H6fGKn25UfTR0uFykOAGrZZ56ZkjSnNEn0=; b=xQZJPwJaEoWeW0ncN0u33r4nCZnObCJbSqqpMRAc79UzKL1+2n67/sF+gbKPLkyMe9 zK7nBH4woa3qVIQZiDdgf1b9UdgrLh20LPeOOYEZ2zu8Jk0vJGSwz86wCNwtM0M3b/0G BSHm1Y7W8MxrAW+RLYnWOlykywKz0QhdBKyZG+LlVjx2eEPPH3uRHKePxYMASI+zyXhH L8LI51taA9GGJ7/SDALfyYEIKodriKlOg5i39X6sKfzxUQlXSHZqpgCXRuaY752HAci6 txTLaJILxHJ2WDqFnflbOSoIouBYE+cBu+q1s0AtA9BdEtcZs7llImTaBHCqRjMY99mC iIjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i92xkS2Y; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a170902c64300b00172f32450b7si12854064pls.197.2023.01.11.02.06.59; Wed, 11 Jan 2023 02:07:06 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=i92xkS2Y; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238563AbjAKJ6H (ORCPT + 53 others); Wed, 11 Jan 2023 04:58:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238666AbjAKJ5M (ORCPT ); Wed, 11 Jan 2023 04:57:12 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E34EB499 for ; Wed, 11 Jan 2023 01:54:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58C9B61BA9 for ; Wed, 11 Jan 2023 09:54:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4861BC433F1; Wed, 11 Jan 2023 09:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673430893; bh=egaZNlCfbk8HNqQyQyW+04UYl+HQzUblbmjTcc12IYg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=i92xkS2YE07YOLe67+GiXOsaso0zuSl8bOvrJJZMIq/5QKsU6cuZl7NwJaYIOotF3 K7MYw0/OQKIfaEwgRMo7pcptqfQAwQF295ehKamT5l0W26eRzDb4ec/G5TNDbhbTcz e3MMNMR1ol79bzjO76NjIaPjO2cfs/Or8H66yyFevIDTA1CipDBNkudlBZmLfhBi9/ mu416eaX0Zyqs5M2nzfFzCEHk4+bnl3lZct8mQZClU0k1XsO9UvxeCkv1ZRpI6A5bC OlvIBFU8HS6pYioKb4mi43mgJBlh4rmoU3n0JhYgUTM1L7TEu2EfzB7kldNix9D8sN DUQihRkpcDYJA== Message-ID: <0acd9312-a4d2-20f0-eeaf-d1410dca48e1@kernel.org> Date: Wed, 11 Jan 2023 10:54:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] tracing/osnoise: Use built-in RCU list checking To: Chuang Wang Cc: Steven Rostedt , Masami Hiramatsu , linux-kernel@vger.kernel.org References: <20221227023036.784337-1-nashuiliang@gmail.com> Content-Language: en-US From: Daniel Bristot de Oliveira In-Reply-To: <20221227023036.784337-1-nashuiliang@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/22 03:30, Chuang Wang wrote: > list_for_each_entry_rcu() has built-in RCU and lock checking. > > Pass cond argument to list_for_each_entry_rcu() to silence false lockdep > warning when CONFIG_PROVE_RCU_LIST is enabled. > > Execute as follow: > > [tracing]# echo osnoise > current_tracer > [tracing]# echo 1 > tracing_on > [tracing]# echo 0 > tracing_on > > The trace_types_lock is held when osnoise_tracer_stop() or > timerlat_tracer_stop() are called in the non-RCU read side section. > So, pass lockdep_is_held(&trace_types_lock) to silence false lockdep > warning. > > Fixes: dae181349f1e ("tracing/osnoise: Support a list of trace_array *tr") > Signed-off-by: Chuang Wang Acked-by: Daniel Bristot de Oliveira Thanks! -- Daniel