[Bug tapsets/13694] New: on rhel6, tcp.sendmsg returns incorrect "sock" local variable

dsmith at redhat dot com sourceware-bugzilla@sourceware.org
Wed Feb 15 16:59:00 GMT 2012


http://sourceware.org/bugzilla/show_bug.cgi?id=13694

             Bug #: 13694
           Summary: on rhel6, tcp.sendmsg returns incorrect "sock" local
                    variable
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap@sourceware.org
        ReportedBy: dsmith@redhat.com
    Classification: Unclassified


The tcp.sendmsg probe alias looks like this:

probe tcp.sendmsg = kernel.function("tcp_sendmsg") {                            
        name = "tcp.sendmsg"                                                    
        sock = (@defined($sock) ? $sock : $sk)                              
        size    = $size                                                         
}                                                                               

However, $sock and $sk have different types as shown by the following table:

OS        tcp.sendmsg             tcp.rcvmsg
========  =====================   ================
rhel5     $sk:struct sock*        $sk:struct sock*                              
rhel6     $sock:struct socket *   $sk:struct sock*                              
rawhide   $sk:struct sock *       $sk:struct sock*                              

So, if a script uses the tcp.sendmsg probe alias on RHEL6, the "sock" local
variable will have the wrong type.

That tcp.sendmsg line should have been (since the 'sk' field of the 'struct
socket' is a 'struct sock *'):

        sock = (@defined($sock) ? $sock->sk : $sk)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Systemtap mailing list