Skip to contentSkip to conversation

rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Nov 27, 2017 – Nov 28, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK

Value assigned to variable ack_at is overwritten before it can be used.

Fix this by removing the value overwrite as it seems that this is a leftover code.

Addresses-Coverity-ID: 1462263
Addresses-Coverity-ID: 1462264

Fixes beb8e5e4f38c ("rxrpc: Express protocol timeouts in terms of RTT")
---
 net/rxrpc/call_event.c | 1 -
 1 file changed, 1 deletion(-)
net/rxrpc/call_event.c +0 -1
index bda952f..03074ba 100644
@@ -123,7 +123,6 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason,
 		else
 			ack_at = expiry;
 
-		ack_at = jiffies + expiry;
 		if (time_before(ack_at, call->ack_at)) {
 			WRITE_ONCE(call->ack_at, ack_at);
 			rxrpc_reduce_call_timer(call, ack_at, now,
Signature · 1 line
2.7.4
maintainer
#1 lore raw

net/rxrpc/call_event.c static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason, · line 126

Quoted 1 line · Gustavo A. R. Silva
net/rxrpc/call_event.c +0 -1
-		ack_at = jiffies + expiry;

Same issue as with the other patch. Can you just combine the two please?

David

#2 lore raw

Quoting David Howells <[email protected]>:

Quoted 6 lines

net/rxrpc/call_event.c static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason, · line 126

Quoted 1 line · Gustavo A. R. Silva
net/rxrpc/call_event.c +0 -1
-		ack_at = jiffies + expiry;

Same issue as with the other patch. Can you just combine the two please?

Sure. I'll send a patch shortly.

Thanks
--
Gustavo A. R. Silva