[PATCH] fix taskfinder2.c for kernels missing the dentry macro

William Cohen wcohen@redhat.com
Tue Dec 23 21:38:00 GMT 2014


The dentry macro has been removed from recent (3.18) kernels (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=78d28e651f97866d608d9b41f8ad291e65d47dd5).  This was causing the following failure for systemtap:


**** failed systemtap kernel-devel smoke test:

In file included from /run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/linux/task_finder.c:17:0,
                 from /run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/linux/runtime.h:214,
                 from /run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/runtime.h:24,
                 from /tmp/stapfmPxz9/stap_7a9281a1c17aed50a52460964c1c5e20_1765_src.c:31:
/run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/linux/task_finder2.c: In function '__stp_call_mmap_callbacks_with_addr':
/run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/linux/task_finder2.c:695:24: error: 'struct file' has no member named 'f_dentry'
   dentry = vma->vm_file->f_dentry;
                        ^
/run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/linux/task_finder2.c: In function '__stp_call_mmap_callbacks_for_task':
/run/media/wcohen/wasteland/wcohen/systemtap_write/install/share/systemtap/runtime/linux/task_finder2.c:1198:42: error: 'struct file' has no member named 'f_dentry'
        vma_cache_p->dentry = vma->vm_file->f_dentry;
                                          ^
make[4]: *** [/tmp/stapfmPxz9/stap_7a9281a1c17aed50a52460964c1c5e20_1765_src.o] Error 1
make[3]: *** [_module_/tmp/stapfmPxz9] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]

**** aborting testing.


The attached patch does allow things to compile and the tests to run, but I am not entirely sure that the patch does the right thing by omitting the setting of dentry.  Does the patch look right?

-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dentry_field.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20141223/9d556949/attachment.bin>


More information about the Systemtap mailing list