[Bug tapsets/26184] fullpath_struct_file does not handle struct dentry on 5.6.19-300.fc32.x86_64
guillaume at morinfr dot org
sourceware-bugzilla@sourceware.org
Wed May 26 22:06:21 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=26184
--- Comment #5 from Guillaume Morin <guillaume at morinfr dot org> ---
This appears to be still present in systemtap 4.5.
This simple workaround seems to fix the problem:
--- a/tapset/linux/dentry.stp 2021-05-26 17:44:48.283925000 -0400
+++ b/tapset/linux/dentry.stp 2021-05-26 17:44:59.122807962 -0400
@@ -264,7 +264,7 @@
/* RHEL7+ kernels */
if (! @type_member_defined("vfsmount", mnt_parent)) {
/* Global root? */
- if (mnt != mnt->mnt_parent) {
+ if (mnt && mnt != mnt->mnt_parent) {
dentry = mnt->mnt_mountpoint
vfsmnt = & mnt->mnt_parent->mnt
mnt = mnt->mnt_parent
However, mnt should not be 0 at that point in the code. The mnt var should be
defined if @type_member_defined("mount", mnt_parent) is true and it should be
the case in any kernel released in the past 10 years.
_But_ I verified that it does not evaluate to true with the example given by
the original reporter (stap -v -c /bin/false -e 'probe process.begin {
printf("%s\n", fullpath_struct_file(task_current(), current_exe_file()));
exit(); }').
I also can reproduce with a completely different example (a longer one). I
could provide it if necessary but the original reproducer is simple enough.
It does look like a bug similar to
https://sourceware.org/bugzilla/show_bug.cgi?id=20672
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list