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 D6D42C4167B for ; Tue, 5 Dec 2023 15:20:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442363AbjLEPT5 (ORCPT ); Tue, 5 Dec 2023 10:19:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346848AbjLEPTx (ORCPT ); Tue, 5 Dec 2023 10:19:53 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DB381A4 for ; Tue, 5 Dec 2023 07:19:57 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54631C433C8; Tue, 5 Dec 2023 15:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701789596; bh=ESDuP7NVVlvgAJpmS9L3L4ji0KgGi7hT55Q57KBxzu4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kBjvUUsE0hmw9JI2Ft9sn5J2xziqoli8xPJp2mIjjibv4EGtM8TNNevzF/QZDuHwa MK5XVsaRAnGzogU77hYHgf64XoL5NwjdCYWf5J/akr+8Kw0rcaQ44+wGy8Y9Is47ef QTOjutmydzGoGsTwdwR6w5UF0MafyFAdUb/2qRsLEtZ6fNlwGebfdzhChV/aOdppGx t9hHxD+OS+FEux5L6ZVKXL++0XBUfoMvb64etlUWp/RwCqeelUnxYKwYXY7dahKlMP Uvy3lzFLIANxKb7/+naCjER9wYcDAVPUt0g24vUAvaL8oy9CyIXB9d33iaboFJJxaB oKvwb5gpw1zZw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B953740094; Tue, 5 Dec 2023 12:19:53 -0300 (-03) Date: Tue, 5 Dec 2023 12:19:53 -0300 From: Arnaldo Carvalho de Melo To: Ilkka Koskinen Cc: Ian Rogers , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Kajol Jain , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set Message-ID: References: <20231204182330.654255-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Dec 04, 2023 at 02:44:54PM -0800, Ilkka Koskinen escreveu: > > > On Mon, 4 Dec 2023, Ian Rogers wrote: > > A metric is default by having "Default" within its groups. The default > > metricgroup name needn't be set and this can result in segv in > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup > > that assume it has a value when there is a Default metric group. To > > avoid the segv initialize the value to "". > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup") > > Signed-off-by: Ian Rogers > > Thanks! I was going to look for the bug but got pulled to other tasks. The > patch looks good to me and I tested it successfully on AmpereOne. > > Reviewed-and-tested-by: Ilkka Koskinen Thanks, applied to perf-tools-next. - Arnaldo