From: Andrei Vagin <avagin@virtuozzo.com>
To: Vasily Averin <vvs@virtuozzo.com>
Cc: linux-kernel@vger.kernel.org,
Hari Bathini <hbathini@linux.vnet.ibm.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: lost path_put in perf_fill_ns_link_info
Date: Tue, 7 Nov 2017 11:03:19 -0800 [thread overview]
Message-ID: <20171107190318.GA31295@outlook.office365.com> (raw)
In-Reply-To: <c15b71b7-b835-bb48-d459-e553217a003d@virtuozzo.com>
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 <sched.h>
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 <vvs@virtuozzo.com>
> ---
> 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);
> }
> }
>
next prev parent reply other threads:[~2017-11-07 19:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 6:22 [PATCH] " Vasily Averin
2017-11-06 6:34 ` Vasily Averin
2017-11-07 19:03 ` Andrei Vagin [this message]
2017-11-07 19:51 ` Andrei Vagin
[not found] ` <20171108120915.n7i46j2yly6fb7bj@ukko.fi.intel.com>
2017-11-08 13:04 ` [PATCH] " Vasily Averin
2017-11-15 5:48 ` Vasily Averin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171107190318.GA31295@outlook.office365.com \
--to=avagin@virtuozzo.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=vvs@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®