summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/input.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-05-10 23:26:00 +0100
committerDavid Howells <dhowells@redhat.com>2018-05-10 23:26:00 +0100
commitc54e43d752c7187595c8c62a231e0b0d53c7fded (patch)
tree3e813d2af3416daf069285dbaefced6e2cc89982 /net/rxrpc/input.c
parent4a026da91caaa36004a53a844dd00959370ea8fc (diff)
downloadlinux-stable-c54e43d752c7187595c8c62a231e0b0d53c7fded.tar.gz
linux-stable-c54e43d752c7187595c8c62a231e0b0d53c7fded.tar.bz2
linux-stable-c54e43d752c7187595c8c62a231e0b0d53c7fded.zip
rxrpc: Fix missing start of call timeout
The expect_rx_by call timeout is supposed to be set when a call is started to indicate that we need to receive a packet by that point. This is currently put back every time we receive a packet, but it isn't started when we first send a packet. Without this, the call may wait forever if the server doesn't deign to reply. Fix this by setting the timeout upon a successful UDP sendmsg call for the first DATA packet. The timeout is initiated only for initial transmission and not for subsequent retries as we don't want the retry mechanism to extend the timeout indefinitely. Fixes: a158bdd3247b ("rxrpc: Fix call timeouts") Reported-by: Marc Dionne <marc.dionne@auristor.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/input.c')
-rw-r--r--net/rxrpc/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 0410d2277ca2..b5fd6381313d 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -971,7 +971,7 @@ static void rxrpc_input_call_packet(struct rxrpc_call *call,
if (timo) {
unsigned long now = jiffies, expect_rx_by;
- expect_rx_by = jiffies + timo;
+ expect_rx_by = now + timo;
WRITE_ONCE(call->expect_rx_by, expect_rx_by);
rxrpc_reduce_call_timer(call, expect_rx_by, now,
rxrpc_timer_set_for_normal);