From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0948FC43334 for ; Tue, 12 Jul 2022 14:51:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233740AbiGLOvI (ORCPT ); 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 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