This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/13694] New: on rhel6, tcp.sendmsg returns incorrect "sock" local variable
- From: "dsmith at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 15 Feb 2012 16:58:49 +0000
- Subject: [Bug tapsets/13694] New: on rhel6, tcp.sendmsg returns incorrect "sock" local variable
- Auto-submitted: auto-generated
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.