]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
rxrpc: Trace protocol errors in received packets
authorDavid Howells <dhowells@redhat.com>
Thu, 6 Apr 2017 09:12:00 +0000 (10:12 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 6 Apr 2017 10:09:39 +0000 (11:09 +0100)
commitfb46f6ee10e78799ea38cf97e4bf52cb70f1228a
tree070c369bd2417cc34c6e61b93e8567450406a55c
parentef68622da9cc0c4e5202f90093a3a5314e41e9e9
rxrpc: Trace protocol errors in received packets

Add a tracepoint (rxrpc_rx_proto) to record protocol errors in received
packets.  The following changes are made:

 (1) Add a function, __rxrpc_abort_eproto(), to note a protocol error on a
     call and mark the call aborted.  This is wrapped by
     rxrpc_abort_eproto() that makes the why string usable in trace.

 (2) Add trace_rxrpc_rx_proto() or rxrpc_abort_eproto() to protocol error
     generation points, replacing rxrpc_abort_call() with the latter.

 (3) Only send an abort packet in rxkad_verify_packet*() if we actually
     managed to abort the call.

Note that a trace event is also emitted if a kernel user (e.g. afs) tries
to send data through a call when it's not in the transmission phase, though
it's not technically a receive event.

Signed-off-by: David Howells <dhowells@redhat.com>
include/trace/events/rxrpc.h
net/rxrpc/ar-internal.h
net/rxrpc/conn_event.c
net/rxrpc/input.c
net/rxrpc/insecure.c
net/rxrpc/recvmsg.c
net/rxrpc/rxkad.c
net/rxrpc/sendmsg.c