aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorSong Liu <[email protected]>2018-04-23 10:21:34 -0700
committerSteven Rostedt (VMware) <[email protected]>2018-04-26 14:49:55 -0400
commit0c92c7a3c5d416f47b32c5f20a611dfeca5d5f2e (patch)
treec026dee7fb9670fd19974890fa441085912299cd /tools/perf/scripts/python/bin/export-to-postgresql-report
parent9a0fd675304d410f3a9586e1b333e16f4658d56c (diff)
tracing: Fix bad use of igrab in trace_uprobe.c
As 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. Link: http://lkml.kernel.org/r/[email protected] Fixes: f3f096cfedf8 ("tracing: Provide trace events interface for uprobes") Fixes: 33ea4b24277b ("perf/core: Implement the 'perf_uprobe' PMU") Cc: [email protected] Cc: Ingo Molnar <[email protected]> Cc: Howard McLauchlan <[email protected]> Cc: Josef Bacik <[email protected]> Cc: Srikar Dronamraju <[email protected]> Acked-by: Miklos Szeredi <[email protected]> Reported-by: Miklos Szeredi <[email protected]> Signed-off-by: Song Liu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions