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>
This commit is contained in:
@@ -623,7 +623,8 @@ int rxrpc_kernel_send_data(struct socket *sock, struct rxrpc_call *call,
|
||||
read_unlock_bh(&call->state_lock);
|
||||
break;
|
||||
default:
|
||||
/* Request phase complete for this client call */
|
||||
/* Request phase complete for this client call */
|
||||
trace_rxrpc_rx_eproto(call, 0, tracepoint_string("late_send"));
|
||||
ret = -EPROTO;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user