Bug 1172775 - dereferencing pointer to incomplete type struct knfsd_fh
Summary: dereferencing pointer to incomplete type struct knfsd_fh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: systemtap
Version: DTS 3.0 RHEL 7
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: alpha
: 3.0
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On: 1171823
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-10 17:28 UTC by Martin Cermak
Modified: 2015-04-23 08:02 UTC (History)
8 users (show)

Fixed In Version: devtoolset-3-systemtap-2.6-9
Doc Type: Bug Fix
Doc Text:
Clone Of: 1171823
Environment:
Last Closed: 2015-04-23 08:02:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:0881 0 normal SHIPPED_LIVE devtoolset-3-systemtap bug fix and enhancement update 2015-04-23 12:01:46 UTC

Description Martin Cermak 2014-12-10 17:28:51 UTC
+++ This bug was initially created as a clone of Bug #1171823 +++

With systemtap-2.6-7.el7 and kernel-3.10.0-206.el7 I see following issue:

# stap -v -c 'ls /tmp/some-nfs-mounted-dir' -e 'probe nfsd.open{print(fh)}'
Pass 1: parsed user script and 114 library script(s) using 218252virt/35588res/3020shr/33140data kb, in 150usr/20sys/163real ms.
Pass  2: analyzed script: 3 probe(s), 4 function(s), 7 embed(s), 1 global(s)  using 342580virt/161080res/4156shr/157468data kb, in  1720usr/380sys/2110real ms.
Pass  3: translated to C into  "/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.c" using  342580virt/161380res/4456shr/157468data kb, in 200usr/60sys/254real ms.
/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.c: In function ‘function___svc_fh’:
/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.c:240:28: error: dereferencing pointer to incomplete type
  struct knfsd_fh *fh = &fhp->fh_handle;
                            ^
make[2]: *** [/tmp/stapOF3Ipl/stap_4c24a6feff91c0788091460de2197891_5006_src.o] Error 1
make[1]: *** [_module_/tmp/stapOF3Ipl] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_4c24a6feff91c0788091460de2197891_5006.ko" in 650usr/270sys/843real ms.
Pass 4: compilation failed.  [man error::pass4]

----------------

<@fche> so the problem appears to be that struct svc_fh's declaration moved from  include/linux/nfsd/nfsfh.h to  
              fs/nfsd/nfsfh.h
<@fche> the latter is not accessible to stap's embedded-c code

--- Additional comment from David Smith on 2014-12-08 21:05:56 CET ---

Fixed upstream in commit f739850:

<https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=f73985072571f93684e7742733d8d06b477b02bf;hp=eb7d25eccd83ccda7f24e4281e4d3044395f56c6>

This commit should easily backport.

--- Additional comment from David Smith on 2014-12-08 23:20:10 CET ---

Upstream commit 957812a simplifies the previous fix and should be backported as well:

<https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=patch;h=957812abcb03ad5eb2b544c7fff111b967deb211>

... stuff deleted ...

Comment 4 errata-xmlrpc 2015-04-23 08:02:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0881.html


Note You need to log in before you can comment on or make changes to this bug.