diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-11-28 20:28:52 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-11-29 17:44:22 +0300 |
commit | 282ef4729195c8503f7101d574acfb5e7c8a8209 (patch) | |
tree | 3fb0133ea601ed5a3f97f1fbaec0f5f72a70c1ff /net/rxrpc/call_event.c | |
parent | 5fc62f6a139a7b06b027bf442cd4205619506f59 (diff) | |
download | linux-282ef4729195c8503f7101d574acfb5e7c8a8209.tar.xz |
rxrpc: Fix variable overwrite
Values assigned to both variable resend_at and ack_at are overwritten
before they can be used.
The correct fix here is to add 'now' to the previously computed value in
resend_at and ack_at.
Addresses-Coverity-ID: 1462262
Addresses-Coverity-ID: 1462263
Addresses-Coverity-ID: 1462264
Fixes: beb8e5e4f38c ("rxrpc: Express protocol timeouts in terms of RTT")
Link: https://marc.info/?i=17004.1511808959%40warthog.procyon.org.uk
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/call_event.c')
-rw-r--r-- | net/rxrpc/call_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index 555274ddc514..ad2ab1103189 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -123,7 +123,7 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason, else ack_at = expiry; - ack_at = jiffies + expiry; + ack_at += now; if (time_before(ack_at, call->ack_at)) { WRITE_ONCE(call->ack_at, ack_at); rxrpc_reduce_call_timer(call, ack_at, now, |