Blame SOURCES/rhbz1657909.patch

e4e640
commit f6d68366654176541487a8916c3b61c5b1207736
e4e640
Author: William Cohen <wcohen@redhat.com>
e4e640
Date:   Mon Nov 19 14:23:15 2018 -0500
e4e640
e4e640
    Adjust the vfs_open to provide cred variable with 4.18 kernels
e4e640
    
e4e640
    The kernel's git commit ae2bb293a3e8adbc54d08cede5afc22929030c03
e4e640
    removed the cred argument from the vfs_open.  Thus, there is no $cred
e4e640
    target variable available.  This missing target variable lives on as a
e4e640
    field in the $file target variable.  The patch makes the tapset use
e4e640
    that field if the $cred target variable is not available.  Fixing this
e4e640
    allows the slowvfs.stp example to work with newer linux 4.18 kernels.
e4e640
e4e640
diff --git a/tapset/linux/vfs.stp b/tapset/linux/vfs.stp
e4e640
index 1fe71ae..7505dfa 100644
e4e640
--- a/tapset/linux/vfs.stp
e4e640
+++ b/tapset/linux/vfs.stp
e4e640
@@ -1296,7 +1296,7 @@ probe vfs.open = kernel.function("vfs_open") ?
e4e640
 {
e4e640
         name = "vfs.open"
e4e640
         path = $path
e4e640
-        cred = $cred
e4e640
+        cred = @defined($cred) ? $cred : $file->f_cred
e4e640
         pathname = fullpath_struct_path($path)
e4e640
         argstr = sprintf("%s, %p", pathname, $cred)
e4e640
 }
e4e640
@@ -1311,6 +1311,6 @@ probe vfs.open.return = kernel.function("vfs_open").return ?
e4e640
 	error_str = error ? errno_str(error) : ""
e4e640
 
e4e640
         path = @entry($path)
e4e640
-        cred = @entry($cred)
e4e640
+        cred = @entry(@defined($cred) ? $cred : $file->f_cred)
e4e640
         pathname = fullpath_struct_path(@entry($path))
e4e640
 }