This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix probe use of 'cred' variable

Commit f6d683666 adjusted the 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 <>
 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 = 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 = kernel.function("vfs_open").return ?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]