Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3549548ybz; Mon, 20 Apr 2020 05:07:57 -0700 (PDT) X-Google-Smtp-Source: APiQypKuBJfshqWrWmLCQ2soqCFEaaMTt88yIwHYdG23cWX0Gb9jfmTjslFtO0n9iVRi3HhdEGia X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr16002563ejr.351.1587384477336; Mon, 20 Apr 2020 05:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384477; cv=none; d=google.com; s=arc-20160816; b=yy7kTX8sGl7OxR9JwTCTtGTwFeo1dvLOPNNRVRPOpPbXPAlYjMAW+frSdqnCYAdYEl JD2mS5fs6gN9fO6jpNa+zrL2wj1zwTHfVk+qhzet8kz7LZRxnvGX9tv2ucYVEYPOm2Y7 VMFUI0SOduSkciAHl3pG6kNvb39DcDDYuuSZSOO//9iGVvxfBshc8bZ7oBSu1WUaFMa4 QMWYdD6kHCs5iCEnCfBsCP1mf30xp3ekcbqO7p0Rx5YpwdBlC1VBx2FIm1IJEF1fDbRI KpCwkfqupjfKt351wKh1whN3uPcruAQuE83OZPlRlzsl5rqhmK19V09apABstEJCJefd qO8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=3A+0nM8hNKafzGk6IKdKwOoK9jYn43r9XcaFv8KjCXA=; b=Ab4LXV9dXapwkw1CjTLZb06Y6hL8ThJ1dYIY/9UkXDjC1jL3N06QTcawylHxTRoxWq 10TBUxCTcRmqc+wVPY6ZM52xCU/1r0uJauEdWT1lgiJtd4w5KVPq24gm+ajDjTCL+kQB 8yIxSfx4o32H4mKlWY8j0UJ5G1KMQEat01w1IcEbDA8iGeKG150i8Nx4vQv0Nxy84qVg EQLfKuD/fbNfkJa6qDHjKW8YZwVdhUvxa4zETI7t9Q5++cdFSrJ2S4depOAIr1aLpzpH qxupWam7OITby7WQeKxy/OnONQOb5UPdlLt3xJhp0g+K2lwUkKU7qt+U6IC16ZRoEyb1 pVpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TRHLRU+2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ks2si404946ejb.445.2020.04.20.05.07.33; Mon, 20 Apr 2020 05:07:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TRHLRU+2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726537AbgDTMFs (ORCPT + 99 others); Mon, 20 Apr 2020 08:05:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726387AbgDTMFq (ORCPT ); Mon, 20 Apr 2020 08:05:46 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12723C061A0C for ; Mon, 20 Apr 2020 05:05:45 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id c63so10195220qke.2 for ; Mon, 20 Apr 2020 05:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3A+0nM8hNKafzGk6IKdKwOoK9jYn43r9XcaFv8KjCXA=; b=TRHLRU+27dFKXFhXzfUS259L0ChAhkzDhEZZXrPDLaSTDu2ILRUTA3vJDqnPkWdxLI HJhFPUj90UuGRoySLRuJKG5NIxjiWJKfzboGeoYo2oau0X6f5lXYdGHya7jsTp3msAo+ tHf3J/jXvUNI+/keatWH00TevxAN4eIE9WZcgeLOuJX/hqCrSiufhcqp9vU3SvXNQWsc RurUe+3Kamwui9w89QF/Qut8Lwipk+Tuw95TkBwRVfP27Z3EwW3Ix5LlOa1oEpgBSTxN yMrXs8hsnpEAgbmqfrGMa4N11BIp9HYUBh/W93swL3H+a+8ZsKMD/9ViaqdA7Rqlidm5 Fdxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3A+0nM8hNKafzGk6IKdKwOoK9jYn43r9XcaFv8KjCXA=; b=TcnF2PPgVuIVueCVKBjXYRtNpkvAN377mh7FkuNPRAxuzzYpJpIDovYtRqQRY6kpqY Q5kmsifheM8KZIIfdx9eUaVpm0Q1+lLP3XnmNZ7/3baABtSyLX/uDb8NyFuGoB4OGDxS zyS/VQwVi51sJu4tXkHXgY19Z4XxTN0Na1ucQjUn/njq3+cRgu2BPVNbb6BnlEHnx6Bj EHZCrUqdN2IQMGvsjB0YewjWEvY6zRQUiBKsWzPYwZ/DfdpRb2FktGE4ZxZvWw8siOW7 kITYo8EuHo0sBpU9uxhKItCMCEWVmGrjKiiJPklim5A9Ofyxtw9QPOqFPCAaWDkN5+st RNmw== X-Gm-Message-State: AGi0PubKtYIlFsaMgt0ieErd5ArmoRQtpzQWZHm+GNAxhyr4QDUQYzIY mqlJ5sujO437KTlLk7pf0e4= X-Received: by 2002:a37:9f4a:: with SMTP id i71mr15546268qke.132.1587384344271; Mon, 20 Apr 2020 05:05:44 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.37.151]) by smtp.gmail.com with ESMTPSA id h25sm337529qto.87.2020.04.20.05.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 05:05:43 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C9921409A3; Mon, 20 Apr 2020 09:05:40 -0300 (-03) Date: Mon, 20 Apr 2020 09:05:40 -0300 To: Jiri Olsa Cc: Tommi Rantala , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , Namhyung Kim , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] perf cgroup: Avoid needless closing of unopened fd Message-ID: <20200420120540.GB14597@kernel.org> References: <20200417132330.119407-1-tommi.t.rantala@nokia.com> <20200420084847.GC718574@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200420084847.GC718574@krava> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Apr 20, 2020 at 10:48:47AM +0200, Jiri Olsa escreveu: > On Fri, Apr 17, 2020 at 04:23:26PM +0300, Tommi Rantala wrote: > > Do not bother with close() if fd is not valid, just to silence valgrind: > > > > $ valgrind ./perf script > > ==59169== Memcheck, a memory error detector > > ==59169== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. > > ==59169== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info > > ==59169== Command: ./perf script > > ==59169== > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > ==59169== Warning: invalid file descriptor -1 in syscall close() > > > > Signed-off-by: Tommi Rantala > > Acked-by: Jiri Olsa Thanks, applied, - Arnaldo