This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]