From: Steven Rostedt <rostedt@goodmis.org>
To: Song Liu <songliubraving@fb.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-team@fb.com>,
Ingo Molnar <mingo@redhat.com>,
Howard McLauchlan <hmclauchlan@fb.com>,
Josef Bacik <jbacik@fb.com>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Miklos Szeredi <miklos@szeredi.hu>
Subject: Re: [PATCH v3 1/2] tracing: fix bad use of igrab in trace_uprobe.c
Date: Fri, 20 Apr 2018 14:30:08 -0400 [thread overview]
Message-ID: <20180420143008.19959743@gandalf.local.home> (raw)
In-Reply-To: <20180420165625.129593-1-songliubraving@fb.com>
On Fri, 20 Apr 2018 09:56:24 -0700
Song Liu <songliubraving@fb.com> wrote:
> s Miklos reported and suggested:
>
> This pattern repeats two times in trace_uprobe.c and in
> kernel/events/core.c as well:
>
> ret = kern_path(filename, LOOKUP_FOLLOW, &path);
> if (ret)
> goto fail_address_parse;
>
> inode = igrab(d_inode(path.dentry));
> path_put(&path);
>
> And it's wrong. You can only hold a reference to the inode if you
> have an active ref to the superblock as well (which is normally
> through path.mnt) or holding s_umount.
>
> This way unmounting the containing filesystem while the tracepoint is
> active will give you the "VFS: Busy inodes after unmount..." message
> and a crash when the inode is finally put.
>
> Solution: store path instead of inode.
>
> This patch fixes two instances in trace_uprobe.c. struct path is added to
> struct trace_uprobe to keep the inode and containing mount point
> referenced.
>
> Fixes: f3f096cfedf8 ("tracing: Provide trace events interface for uprobes")
> Fixes: 33ea4b24277b ("perf/core: Implement the 'perf_uprobe' PMU")
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Howard McLauchlan <hmclauchlan@fb.com>
> Cc: Josef Bacik <jbacik@fb.com>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Cc: Miklos Szeredi <miklos@szeredi.hu>
> Reported-by: Miklos Szeredi <miklos@szeredi.hu>
> Signed-off-by: Song Liu <songliubraving@fb.com>
> ---
Can I get an Acked-by or Reviewed-by from someone?
Thanks!
-- Steve
next prev parent reply other threads:[~2018-04-20 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 16:56 Song Liu
2018-04-20 16:56 ` [PATCH v3 2/2] tracing: remove igrab() iput() call from uprobes.c Song Liu
2018-04-20 17:50 ` Steven Rostedt
2018-04-23 10:03 ` Miklos Szeredi
2018-04-23 11:23 ` Song Liu
2018-04-20 18:30 ` Steven Rostedt [this message]
2018-04-23 9:56 ` [PATCH v3 1/2] tracing: fix bad use of igrab in trace_uprobe.c Miklos Szeredi
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=20180420143008.19959743@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=hmclauchlan@fb.com \
--cc=jbacik@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mingo@redhat.com \
--cc=songliubraving@fb.com \
--cc=srikar@linux.vnet.ibm.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®