1
0
Fork 0
remarkable-linux/net/rxrpc
David Howells 3d57ec51d2 rxrpc: Ignore BUSY packets on old calls
[ Upstream commit 4d4a6ac73e ]

If we receive a BUSY packet for a call we think we've just completed, the
packet is handed off to the connection processor to deal with - but the
connection processor doesn't expect a BUSY packet and so flags a protocol
error.

Fix this by simply ignoring the BUSY packet for the moment.

The symptom of this may appear as a system call failing with EPROTO.  This
may be triggered by pressing ctrl-C under some circumstances.

This comes about we abort calls due to interruption by a signal (which we
shouldn't do, but that's going to be a large fix and mostly in fs/afs/).
What happens is that we abort the call and may also abort follow up calls
too (this needs offloading somehoe).  So we see a transmission of something
like the following sequence of packets:

	DATA for call N
	ABORT call N
	DATA for call N+1
	ABORT call N+1

in very quick succession on the same channel.  However, the peer may have
deferred the processing of the ABORT from the call N to a background thread
and thus sees the DATA message from the call N+1 coming in before it has
cleared the channel.  Thus it sends a BUSY packet[*].

[*] Note that some implementations (OpenAFS, for example) mark the BUSY
    packet with one plus the callNumber of the call prior to call N.
    Ordinarily, this would be call N, but there's no requirement for the
    calls on a channel to be numbered strictly sequentially (the number is
    required to increase).

    This is wrong and means that the callNumber in the BUSY packet should
    be ignored (it really ought to be N+1 since that's what it's in
    response to).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-20 10:07:25 +01:00
..
Kconfig rxrpc: Add config to inject packet loss 2016-09-17 11:24:04 +01:00
Makefile rxrpc: Split sendmsg from packet transmission code 2016-09-04 21:41:39 +01:00
af_rxrpc.c rxrpc: Accesses of rxrpc_local::service need to be RCU managed 2016-10-06 08:11:48 +01:00
ar-internal.h rxrpc: Need to produce an ACK for service op if op takes a long time 2016-10-06 08:11:50 +01:00
call_accept.c rxrpc: Fix warning by splitting rxrpc_send_call_packet() 2016-10-06 08:11:49 +01:00
call_event.c rxrpc: Need to produce an ACK for service op if op takes a long time 2016-10-06 08:11:50 +01:00
call_object.c rxrpc: Fix checker warning by not passing always-zero value to ERR_PTR() 2016-10-13 08:39:52 +01:00
conn_client.c rxrpc: When activating client conn channels, do state check inside lock 2016-09-29 22:57:47 +01:00
conn_event.c rxrpc: Ignore BUSY packets on old calls 2017-12-20 10:07:25 +01:00
conn_object.c rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs 2016-09-22 01:23:50 +01:00
conn_service.c rxrpc: Add connection tracepoint and client conn state tracepoint 2016-09-17 11:24:03 +01:00
input.c rxrpc: Wake up the transmitter if Rx window size increases on the peer 2017-12-20 10:07:19 +01:00
insecure.c rxrpc: Rewrite the data and ack handling code 2016-09-08 11:10:12 +01:00
key.c rxrpc: Fix several cases where a padded len isn't checked in ticket decode 2017-06-29 13:00:31 +02:00
local_event.c rxrpc: The offset field in struct rxrpc_skb_priv is unnecessary 2016-09-30 14:39:28 +01:00
local_object.c rxrpc: Reduce the rxrpc_local::services list to a pointer 2016-09-29 22:57:47 +01:00
misc.c rxrpc: Need to produce an ACK for service op if op takes a long time 2016-10-06 08:11:50 +01:00
output.c rxrpc: Don't request an ACK on the last DATA packet of a call's Tx phase 2016-10-06 08:11:51 +01:00
peer_event.c rxrpc: Add per-peer RTT tracker 2016-09-22 01:26:25 +01:00
peer_object.c rxrpc: Fix checking of error from ip6_route_output() 2016-10-13 08:43:17 +01:00
proc.c rxrpc: Add IPv6 support 2016-09-13 23:09:13 +01:00
recvmsg.c rxrpc: Need to produce an ACK for service op if op takes a long time 2016-10-06 08:11:50 +01:00
rxkad.c rxrpc: Fix warning by splitting rxrpc_send_call_packet() 2016-10-06 08:11:49 +01:00
security.c rxrpc: Reduce the rxrpc_local::services list to a pointer 2016-09-29 22:57:47 +01:00
sendmsg.c rxrpc: Need to produce an ACK for service op if op takes a long time 2016-10-06 08:11:50 +01:00
skbuff.c rxrpc: Make Tx loss-injection go through normal return and adjust tracing 2016-09-29 22:37:15 +01:00
sysctl.c rxrpc: Keep the call timeouts as ktimes rather than jiffies 2016-09-30 14:40:11 +01:00
utils.c rxrpc: Make IPv6 support conditional on CONFIG_IPV6 2016-09-17 03:58:45 -04:00