This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] Fix vfs.open probe use of 'cred' variable
- From: Frank Sorenson <sorenson at redhat dot com>
- To: systemtap at sourceware dot org
- Cc: sorenson at redhat dot com
- Date: Fri, 7 Feb 2020 10:14:46 -0600
- Subject: [PATCH] Fix vfs.open probe use of 'cred' variable
Commit f6d683666 adjusted the vfs.open probe to obtain the $cred
target variable from a field of the $file target variable on
kernels where $cred is not available. This change missed a
second reference to the $cred target variable within the probe.
Fix the reference to the possibly-unavailable target variable
by referencing the systemtap variable just obtained.
Fixes: Commit f6d683666 ("Adjust the vfs_open to provide cred variable with 4.18 kernels")
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
---
tapset/linux/vfs.stp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tapset/linux/vfs.stp b/tapset/linux/vfs.stp
index 7505dfa32..d513ff970 100644
--- a/tapset/linux/vfs.stp
+++ b/tapset/linux/vfs.stp
@@ -1298,7 +1298,7 @@ probe vfs.open = kernel.function("vfs_open") ?
path = $path
cred = @defined($cred) ? $cred : $file->f_cred
pathname = fullpath_struct_path($path)
- argstr = sprintf("%s, %p", pathname, $cred)
+ argstr = sprintf("%s, %p", pathname, cred)
}
probe vfs.open.return = kernel.function("vfs_open").return ?
--
2.20.1