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 X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, URIBL_DBL_ABUSE_MALW autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DF1FC2D0DB for ; Fri, 31 Jan 2020 15:42:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7075B214D8 for ; Fri, 31 Jan 2020 15:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729276AbgAaPmy (ORCPT ); Fri, 31 Jan 2020 10:42:54 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:47465 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729004AbgAaPmy (ORCPT ); Fri, 31 Jan 2020 10:42:54 -0500 X-Originating-IP: 176.54.15.204 Received: from [10.3.243.48] (unknown [176.54.15.204]) (Authenticated sender: cengiz@kernel.wtf) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 57E891C0019; Fri, 31 Jan 2020 15:42:49 +0000 (UTC) From: Cengiz Can To: Arnaldo Carvalho de Melo CC: , , Date: Fri, 31 Jan 2020 18:42:39 +0300 Message-ID: <16ffc41db20.2bfa.85c738e3968116fc5c0dc2de74002084@kernel.wtf> In-Reply-To: <20200131084343.GI3841@kernel.org> References: <20200120141553.23934-1-cengiz@kernel.wtf> <20200131083858.GH3841@kernel.org> <20200131084343.GI3841@kernel.org> User-Agent: AquaMail/1.23.0-1550-develop (build: 102300000) Subject: Re: [PATCH] tools: perf: add missing unlock to maps__insert error case MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On January 31, 2020 11:43:46 Arnaldo Carvalho de Melo wrote: > Em Fri, Jan 31, 2020 at 09:38:58AM +0100, Arnaldo Carvalho de Melo escreveu: >> Em Mon, Jan 20, 2020 at 05:15:54PM +0300, Cengiz Can escreveu: >>> Please tell me if the `__maps__free_maps_by_name` frees the >>> `rw_semaphore`. If that's the case, should we change the order to unlock >>> and free? >> >> No it doesn't free the rw_semaphore, that is in 'struct maps', what is >> being freed is just something protected by rw_semaphore, >> maps->maps_by_name, so your patch is right and I'm applying it, thanks. > > BTW, you forgot to add: > > Fixes: a7c2b572e217 ("perf map_groups: Auto sort maps by name, if needed") > > Which I did, and next time please CC the perf tools reviewers, as noted > in MAINTAINERS, the lines starting with R:. Missed that. Thank you for reminding and correction. Cheers > > - Arnaldo > > [acme@quaco perf]$ grep -A21 "PERFORMANCE EVENTS SUBSYSTEM$" MAINTAINERS > PERFORMANCE EVENTS SUBSYSTEM > M: Peter Zijlstra > M: Ingo Molnar > M: Arnaldo Carvalho de Melo > R: Mark Rutland > R: Alexander Shishkin > R: Jiri Olsa > R: Namhyung Kim > L: linux-kernel@vger.kernel.org > T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core > S: Supported > F: kernel/events/* > F: include/linux/perf_event.h > F: include/uapi/linux/perf_event.h > F: arch/*/kernel/perf_event*.c > F: arch/*/kernel/*/perf_event*.c > F: arch/*/kernel/*/*/perf_event*.c > F: arch/*/include/asm/perf_event.h > F: arch/*/kernel/perf_callchain.c > F: arch/*/events/* > F: arch/*/events/*/* > F: tools/perf/ > [acme@quaco perf]$