* [PATCH] Fix vfs.open probe use of 'cred' variable
@ 2020-02-07 16:16 Frank Sorenson
0 siblings, 0 replies; only message in thread
From: Frank Sorenson @ 2020-02-07 16:16 UTC (permalink / raw)
To: systemtap; +Cc: sorenson
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-07 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 16:16 [PATCH] Fix vfs.open probe use of 'cred' variable Frank Sorenson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).