Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6064021rwd; Mon, 19 Jun 2023 01:34:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fdaxVTRvgWs8lFZXcZFrakKbpt8n2KFj3xnJKbBXjkAnRmpqCcP8V8r1sBjE8zIn4QLm1 X-Received: by 2002:a05:6808:2788:b0:39e:acab:1558 with SMTP id es8-20020a056808278800b0039eacab1558mr5742658oib.45.1687163666883; Mon, 19 Jun 2023 01:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687163666; cv=none; d=google.com; s=arc-20160816; b=Sde3DwG/rfJfk2X1oUI7EKWajA1PfpXKiYlsiURPeO8osIqyntS9E7gWMtlfeIjUix AIZx36EevDfgZnMS8IT95YagZrxKBAyHd8bmGRHBXeS4QwGXPYsuGDKOj45WoSkijKQe NVxJSwHyvi+bffaGdj6hphP8O5zUIcaXdtiHVO88Rt7CSP5I0akMnhu1tuWptQFmcgnp TDibAK+NOWh8mGART1WR4SeN3ZHy6GN3ZKSez3nXvpBaaMBrvcB7nslnS9/w/qlMLfO8 1ml0JPF4KmGkJ0geWCSGCXt+4WjDTL8KnbuiLRVga3Vv2WyPfuncMLZ9XHbP4x89pYAz C1ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GiPShpyOOA9TX7TDz2Tw8ZVCtfRLVM2FH919R5mLiKY=; b=NZuADjqftStLkYkk2bld5+JlDlSWbsjCiZcU9w41trhr+RJjJL83l+TU5NLb68Vob2 ja1tgXtlPZUoNO9mBd3cWXmVMoNd61Z4VPWpnTaE37VoJvY3/qhhOTi7m9pshjD7qIGB QUDlg0NgXPy22jYF+UJ2k/BKFVkIuuSxmeW+KPknLvGayuA9YWTjeBm0py4wNG/WY8lj 5yKcFBCFcrEmWH9f5BmWhBGNli4tTHzc3QJekNl4AI4IvXVIEs/J0Bgnu52i/vTyyIQ3 Y2rH15TZcWrj/Prw7nMR1qu1AgWCNRCCivvVbg3ikbhCmD13sm2Khb2Qh1U3ao2uWJ0+ mX4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dgI/9E35"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b71-20020a63344a000000b0054fa5ebd2ebsi9828333pga.394.2023.06.19.01.34.14; Mon, 19 Jun 2023 01:34:26 -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=@linuxfoundation.org header.s=korg header.b="dgI/9E35"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbjFSI1R (ORCPT + 99 others); Mon, 19 Jun 2023 04:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbjFSI1J (ORCPT ); Mon, 19 Jun 2023 04:27:09 -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 9D77710E4; Mon, 19 Jun 2023 01:26:59 -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 B2F26615C2; Mon, 19 Jun 2023 08:26:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA3CAC433C8; Mon, 19 Jun 2023 08:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687163218; bh=jPDfUrPJFx3VNBCs3Fpr5ysGOFFZmq//beORD/0x07g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dgI/9E35VmXupbNJtu1EVDXsz+Fhn/CmEPvwyUcWWwM7XOvhrvkml+l4G26N8EC/p 5esP34IjEzGpFVBPQGuRy4cMZsPZH3KNHWFp8JnVPv4JwGSC5VEnoeBqU6OAy9d2XC E4cSiJvZdrcEkNKjELPiYYahsJAPMhAYEroQM9pU= Date: Mon, 19 Jun 2023 10:26:51 +0200 From: Greg KH To: Zheng Yejian Cc: rostedt@goodmis.org, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 5.10] tracing: Add tracing_reset_all_online_cpus_unlocked() function Message-ID: <2023061913-dosage-repacking-678e@gregkh> References: <20230615204931.3250659-1-zhengyejian1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230615204931.3250659-1-zhengyejian1@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, Jun 16, 2023 at 04:49:31AM +0800, Zheng Yejian wrote: > From: "Steven Rostedt (Google)" > > commit e18eb8783ec4949adebc7d7b0fdb65f65bfeefd9 upstream. > > Currently the tracing_reset_all_online_cpus() requires the > trace_types_lock held. But only one caller of this function actually has > that lock held before calling it, and the other just takes the lock so > that it can call it. More users of this function is needed where the lock > is not held. > > Add a tracing_reset_all_online_cpus_unlocked() function for the one use > case that calls it without being held, and also add a lockdep_assert to > make sure it is held when called. > > Then have tracing_reset_all_online_cpus() take the lock internally, such > that callers do not need to worry about taking it. > > Link: https://lkml.kernel.org/r/20221123192741.658273220@goodmis.org > > Cc: Masami Hiramatsu > Cc: Andrew Morton > Cc: Zheng Yejian > Signed-off-by: Steven Rostedt (Google) > [this patch is pre-depended by be111ebd8868d4b7c041cb3c6102e1ae27d6dc1d > due to tracing_reset_all_online_cpus() should be called after taking lock] > Fixes: be111ebd8868 ("tracing: Free buffers when a used dynamic event is removed") > Signed-off-by: Zheng Yejian > --- What about for 5.15.y? You can't apply a fix to just an older tree as you will then have a regression when you update. I'll drop this one from my queue, please resend a backport for all relevent stable releases. thanks, greg k-h