rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet
Subsystems (3)
PATCH v2 1/1 rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet
Value assigned to variable resend_at is overwritten before it can be used.
The correct fix here is to add _now_ to the previously computed value in resend_at.
Addresses-Coverity-ID: 1462262
Fixes beb8e5e4f38c ("rxrpc: Express protocol timeouts in terms of RTT")
Signed-off-by Gustavo A. R. Silva <[email protected]>
---
Changes in v2:
Update value in resend_at instead of removing the code.
net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/rxrpc/sendmsg.c +1 -1
@@ -233,7 +233,7 @@ static void rxrpc_queue_packet(struct rxrpc_sock *rx, struct rxrpc_call *call,if (resend_at <1 ) resend_at =1 ; - resend_at = now + rxrpc_resend_timeout; + resend_at += now;WRITE_ONCE (call->resend_at, resend_at);rxrpc_reduce_call_timer (call, resend_at, now, rxrpc_timer_set_for_send);
Signature · 1 line
2.7.4