Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4440029imw; Tue, 12 Jul 2022 08:01:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uhwqO48hyojruyrPloRDPoVrGcieC5lji21/tAYhAF5vgE6PPPWwDY6ZUr0YKqTvAecsfb X-Received: by 2002:a17:902:ab53:b0:16c:3b00:4eaf with SMTP id ij19-20020a170902ab5300b0016c3b004eafmr16529908plb.132.1657638066466; Tue, 12 Jul 2022 08:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657638066; cv=none; d=google.com; s=arc-20160816; b=I2r+S8x2H85prohsXjW11VjF6IxWIs4PqRVi1EgCi2q9OrBrN7f1x5dsl64s4aKQYo /ZdMKH31uWIVzwLRAcQ7vVX24lpnSjggeJtwvQYuJv8SVOGWMRL2ZQY3XSaFCZhkrXOr KcHok2VFi/SuZQMSqKLE0XAEunJM/pKodvub8DoxEL4S84dDtdECYflrQCebHemU+W8G odw57+yy30YnKWWngm1X91WSY0oSR27IayJ5UIex8viCz7MgIWlK6adBHn8/2AUgt0Iv /9Os3bMyr6ueM8wyEb9iuwf00HZkExdnzOu+Dmj1I9Vdr6qQ9hZ/qMryylBUVkS2P4wT YcPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=XPdMRZjdjQlWQXkGZqqom4bXSso7oRLBZvoOeM22PUM=; b=bM2GXpYU2LBnC25FkXZJGUkIfvQMf6HdULnbbS4AXwZabcQRf+wVgo3fWH4SyrJjNj 95eCtsC+2VgkvmWqhh1m8kQVCiKWONvt3aek2mKBrU0ZqeAYc2wEUlc3fBW1A8uBXXWS O9J56mGZatyRoahqcWmAWGHtcoprUXo/o4ToPf4NmN8ZkKTnTH8rD/Lg6rSMSI6q8F4G ahXSDeTBAWdnIx927MIYb+E2GbIp5PWZhnU3k9GfbOcE/Mr1+0EJUEHyPDt4wloidZYB oykWtoOV0YMq42lA5+axvMOZaerZhW6ECf6Iw40ZVrS4ztFPyjoJtCIefslR5ixU+32b OBcg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bj17-20020a056a02019100b003fcdc3249b8si5246532pgb.494.2022.07.12.08.00.47; Tue, 12 Jul 2022 08:01:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233731AbiGLOvI (ORCPT + 99 others); Tue, 12 Jul 2022 10:51:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232562AbiGLOvH (ORCPT ); Tue, 12 Jul 2022 10:51:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC991B1869; Tue, 12 Jul 2022 07:51:06 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 5C327B819A6; Tue, 12 Jul 2022 14:51:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DF2FC3411C; Tue, 12 Jul 2022 14:51:03 +0000 (UTC) Date: Tue, 12 Jul 2022 10:51:01 -0400 From: Steven Rostedt To: Zheng Yejian Cc: , , , , , Subject: Re: [PATCH v2] tracing/histograms: Fix memory leak problem Message-ID: <20220712105101.49020368@gandalf.local.home> In-Reply-To: <20220712114844.158722-1-zhengyejian1@huawei.com> References: <20220711115211.4f613cbe@gandalf.local.home> <20220712114844.158722-1-zhengyejian1@huawei.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 Tue, 12 Jul 2022 19:48:44 +0800 Zheng Yejian wrote: > Since I'm not very familiar with trace_events_hist.c, I roughly conclude that: > 1. warning 1/3/6 are plausible but false-positive; > 2. warning 2/4/5 seems positive although they don't cause practical problems because > elt_data->field_var_str[i] / ref_field->system / ref_field->name can be 'NULL' > on 'kfree'. Do we need to explicitly check 'NULL' there? It's confusing code. Both Tom and I missed it as well. -- Steve