Received: by 10.223.164.202 with SMTP id h10csp958521wrb; Tue, 7 Nov 2017 18:28:46 -0800 (PST) X-Google-Smtp-Source: ABhQp+QpqkrKeXKYeZy/RehONAxvvdRrIQNAysPyL8WYtVGnOyB5Lb5As2nxdvKYZKpC/+glqiZd X-Received: by 10.99.109.14 with SMTP id i14mr752039pgc.355.1510108126465; Tue, 07 Nov 2017 18:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510108126; cv=none; d=google.com; s=arc-20160816; b=RHE0lLMJwLnfzQEdLsl+ooAggvSfT6IDKfhy0bKXix8QpuAhXpl6833tusZ0NDyMJZ fh9wl44ZCxoFWBHla49ftkfJ9g5etim7m4oE1DtuRvYn4+20cVkHHX+yDpAq6qcyxItW Dh5PnIMFaCBcw2BPfJIl5lX6jZtXV6u+uzw50EgstvQC+VcmA+Is2SjxckFJr7VmZhi/ o2Pgt4Q88asnONti/SnrEZCiEVcgHUUek5PLMoOpA1W28UY1sF/kdg8ls037MZRpUvbZ t88+6UYp4mYNgaLJCcNnxke4T/olgSmLFld/lUZ66m9UqGnPNSS+y4Cfz9PbwvORm4Pk 6u9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=iiyVXP+F1JZicQhjObew030dqB8CbhnZB077BQrMjP0=; b=YBHFUtkZyxpkgRgDXol3HJ3eqj/Zb1yY7k6LMgaVudZrFO+aFlRdIt38LYQwRQR4Mo ngGibF7LHOyxvrkG5MD8qu7jx4OuDsewpMEK59dx1uJKX0/nOhUEpF0lLOxYg5qXQb9u hE5Ymt/mCl/uoBzAYqkXqY4ugJ6kVFasXNDLoW7SIx/kUlYsvW9lVxrKKR5Wy90B0QfQ ie3h+cjaiNOeuVjMsl/jBD/kIB1ln+seAoD4ylJIH+BX/ffI37zyPdDEHHR1MpjV7Pr3 IQpQ+I0cIww7dOqB29fgf58xodS4U/uTNj2EzsqSOdORzcA/24clEQ97g+1q6SC7jzwL qNzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=ic92RcTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si2459446pgn.171.2017.11.07.18.28.34; Tue, 07 Nov 2017 18:28:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=ic92RcTN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756861AbdKGTDn (ORCPT + 90 others); Tue, 7 Nov 2017 14:03:43 -0500 Received: from mail-db5eur01on0098.outbound.protection.outlook.com ([104.47.2.98]:49674 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754016AbdKGTDl (ORCPT ); Tue, 7 Nov 2017 14:03:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=iiyVXP+F1JZicQhjObew030dqB8CbhnZB077BQrMjP0=; b=ic92RcTNObdCnDWoP5WZ2vqxepWwfWzUVb70O0usZL/0MfLol3NujGNyn3G8fk0P6sd7K99G1/RWrOQC4GcM9jrbYbGoAIWZAwuH7cRcf2y5acAgaIpjJOlBsxL+oHjfNk4N3ovlg/ZExVVXaV0RosTadUjTLWB9Z60BYNZaWvI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=avagin@virtuozzo.com; Received: from outlook.office365.com (4.16.175.162) by AM4PR08MB0739.eurprd08.prod.outlook.com (2a01:111:e400:59ed::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Tue, 7 Nov 2017 19:03:36 +0000 Date: Tue, 7 Nov 2017 11:03:19 -0800 From: Andrei Vagin To: Vasily Averin Cc: linux-kernel@vger.kernel.org, Hari Bathini , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra Subject: Re: lost path_put in perf_fill_ns_link_info Message-ID: <20171107190318.GA31295@outlook.office365.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [4.16.175.162] X-ClientProxiedBy: MWHPR2201CA0052.namprd22.prod.outlook.com (2603:10b6:301:16::26) To AM4PR08MB0739.eurprd08.prod.outlook.com (2a01:111:e400:59ed::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 82e3857d-493c-4fb5-f2c4-08d526124095 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603249);SRVR:AM4PR08MB0739; X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB0739;3:XWj2EJgxSJ8qljfCBn8ozoGnCP4AJca1ktHjV89Nj32N3qUcT/ldjzCYeOuBR6lBTe+vM6BT7/nfugmCnNDYgfBV3zqT1K26Cmetg46bz9riQ596h0hcY7lqKB0Q3w/8KCnso8NDyQBngEM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utJ8zbhVa4rpP0ya8czDSWmNko0LzFssYiQQc66aFijiZj+WQB+ajww4Fs2SDcn97JzX/qULwvAC4gYksIMg2JWqmEWR21PQVoDaoe4HLUtTCRFs46rghhWSl0hqpwss=;4:iWiasmX23ozdyUZd2c6cYS/lkgdt/1q/vMEDrpIxF2T335FuvWX29pOcPnGI63ZSBbU8Fj/8n1/Ypczc4R6wd+4038pE+U3b8ei6OpwCiCeyqfTABOmnFMJGB9qbCWVSgrk5hfpBWVjK2DavAAZArQ4RAtngUtPF+vkv0In/xCe6PheRANZ5vj98IjiZSgkNTq5xbkYRCNSBcJ/KIXPb6Qg2f+rVIa5UkoGxJNcrlpZS8d40LP5FXD+kg6/qktu2GMG+WiP8NG36WYzMpklnFQ== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3231021)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123555025)(20161123564025)(20161123558100)(20161123562025)(201703131423075)(201703061421075)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM4PR08MB0739;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM4PR08MB0739; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(376002)(346002)(24454002)(199003)(189002)(508600001)(83506002)(69596002)(6862004)(53936002)(2906002)(50466002)(16526018)(5660300001)(25786009)(6666003)(189998001)(2950100002)(6246003)(101416001)(55016002)(9686003)(6636002)(1076002)(3846002)(6116002)(229853002)(50986999)(76176999)(54356999)(8676002)(81166006)(33656002)(81156014)(305945005)(23686003)(8936002)(47776003)(66066001)(7736002)(68736007)(106356001)(105586002)(4326008)(53416004)(6506006)(37156001)(16586007)(575784001)(54906003)(97736004)(86362001)(58126008)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:AM4PR08MB0739;H:outlook.office365.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?koi8-r?Q?1;AM4PR08MB0739;23:FDWImaSONAc9tLiakbqOEtRhhkKanMIto9gG4lHANj/?= =?koi8-r?Q?XfuAFyWNmpZuiTpGma2Ckx8ukxDlaWJqWY1n++bmlIZSUk9uOWWfgcx6o6MnbE?= =?koi8-r?Q?OJk4Dzux6YdisEkxdnsoTENS1uScQvmZHN+kjQ1z/ds2LY6pmTvPoYgAMZRgVd?= =?koi8-r?Q?IwZbCuY2+fbhWxFOCL+SFDlVnT9MdJJQiqGo1ywDk4jPSYHrfpMgI8AVhbRCqI?= =?koi8-r?Q?gSAJKM/Z3WhECcywRBapCTfwE6jfrXSK1qSC3LqL9T9NoI72YQ1k3cfceV4ceF?= =?koi8-r?Q?9IhKj0cr2QlryaBnni7+tsHIblMTCfIMRho5wyOeVNZsy6JF1JxuS1JxwZHmBy?= =?koi8-r?Q?tuEiwIU2YiuZrMsIl3QVHmAJp+Kt1ZSvFGczlYZiuoxqlc5qR5z8pblkIzkfn4?= =?koi8-r?Q?CivZ9TNRVELeNkDDwMABahMirCni+zQ24I4+fwCCMoLr0NPPVcc6827QUEZgrU?= =?koi8-r?Q?MJdSVXDw8O6+QLN2dnMTCL6YuYuAUPYTcTR8pK32co7Kne7wFxxHdlytJDChLO?= =?koi8-r?Q?BTZWRUBxtJG5jXtzS7A+paLDTE01xII/gQjllivnPfaJhwQNCD4CT3Nuuu09gO?= =?koi8-r?Q?Ird4w1atusuVVpmwSSwQHhsOB7n2gAz6cRATZ/QPHu2mtDvo32S5YWLCJwYccr?= =?koi8-r?Q?l/7Y48Ly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rZYOT/3sqRtoYzfml9W3qvWdxzF/WX2CpNIBp6xoWhTDABFrvn+m8=;5:EAjojiEwD6chamH8S+jRoauSl7Io5mTLoqsH4flsD219qDfOVFgCmEimA8tOeo9xCzXFE6IKZLx5C6zypCaMHA1GwYMn6VPcb8nRaesd+ANYkZNoeDdgEdYVzn49UcLkePeW7ZmLfLRQ0WZ9SQP+sPme2d5vgN1dXu+7Qq2yGOE=;24:KRoP6PFwsq0UrFtUrXgrWuRMm/zGaDgebkq2SAbfljebRQxP5OdYnPq5OTNd7R+L0Z6j5b429+rf5elK/VvcuIv71BtvzkqzdB8nwI6sZUg=;7:I+DGJ1+/txpAfCcYVLEJ5Kr25w2dFxc4flTLClbExREKBkiKvVZ2FppiC5BOkpZFgLDqpadTk9GJF9v1qRAnriR66G+QJ/QjBWXdv8G06SXbY8eOFVe/JLZqSXzBvlpUgCg0LyTArVyntcMdAPFSwYDZAcejRvzappcmazat0vIxiKF6EkJdnmVuTd6KM/QQVgpblAgtyR1aTibswsCyRr+9kHM2ZmDS6ydeCOVlVduL6OdR74SjOeB3NQ162Pdm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM4PR08MB0739;20:dANk2BILAgIl9MdRCgtyWPter0c/c5vHrUygisrlpUUTew8j9oC8EsjjbsrJh+UdAqQlUFWSJ8K+YCcW2DOU+kXyW1msn+FiWc+MYR01gffYPssr0ROCZxr7Jw/LVZM2fbVrDvHFHL3gVkQrGjGYdEDbQML/YhqDcAhEsSWsIE0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 19:03:36.0128 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82e3857d-493c-4fb5-f2c4-08d526124095 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB0739 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vasily and all, The patch looks correct for me. I tried to reproduce this issue and checked that this patch fixes it. Bellow you can find my test program and a command line to run it. The problem still exists even with this patch. $ cat test.c #define _GNU_SOURCE #include int main(int argc, char **argv) { while (1) unshare(CLONE_NEWUTS); return 0; } $ gcc -o test_unshare test.c $ for i in `seq 10000`; do perf trace -o log unshare -u true; done & [5] 28766 $ for i in `seq 10000`; do perf trace -o log unshare -u true; done & [6] 28840 $ echo 3 > /proc/sys/vm/drop_caches | cat /proc/slabinfo | grep dentry dentry 74848 78660 224 18 1 : tunables 0 0 0 : slabdata 4370 4370 0 $ sleep 10 $ echo 3 > /proc/sys/vm/drop_caches | cat /proc/slabinfo | grep dentry dentry 75145 79002 224 18 1 : tunables 0 0 0 : slabdata 4389 4389 0 $ sleep 10 $ echo 3 > /proc/sys/vm/drop_caches | cat /proc/slabinfo | grep dentry dentry 75921 79776 224 18 1 : tunables 0 0 0 : slabdata 4432 4432 0 $ git log --pretty=oneline | head -n 2 c83bceb10b36cef895def4b2dfe0aff6ca7c9784 lost path_put in perf_fill_ns_link_info 8b82a8a7ab53ee1a065ac69c835737a701f46b2e Add linux-next specific files for 20171107 Thanks, Andrei On Mon, Nov 06, 2017 at 09:22:18AM +0300, Vasily Averin wrote: > Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") > Signed-off-by: Vasily Averin > --- > kernel/events/core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/events/core.c b/kernel/events/core.c > index 10cdb9c..ab5ac84 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -6756,6 +6756,7 @@ static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info, > ns_inode = ns_path.dentry->d_inode; > ns_link_info->dev = new_encode_dev(ns_inode->i_sb->s_dev); > ns_link_info->ino = ns_inode->i_ino; > + path_put(&ns_path); > } > } > From 1583297477653156539@xxx Mon Nov 06 06:35:39 +0000 2017 X-GM-THRID: 1583296720926435526 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread