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: beb8e5e4f3
("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>
This commit is contained in:

committed by
David Howells

parent
5fc62f6a13
commit
282ef47291
@@ -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,
|
||||
|
Reference in New Issue
Block a user