linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK
@ 2017-11-27 18:08 Gustavo A. R. Silva
  2017-11-28 16:06 ` David Howells
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-27 18:08 UTC (permalink / raw)
  To: David Howells, David S. Miller; +Cc: netdev, linux-kernel, Gustavo A. R. Silva

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")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/rxrpc/call_event.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index bda952f..03074ba 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -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,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK
  2017-11-27 18:08 [PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK Gustavo A. R. Silva
@ 2017-11-28 16:06 ` David Howells
  2017-11-28 17:20   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2017-11-28 16:06 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: dhowells, David S. Miller, netdev, linux-kernel

Gustavo A. R. Silva <garsilva@embeddedor.com> wrote:

> -		ack_at = jiffies + expiry;

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

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK
  2017-11-28 16:06 ` David Howells
@ 2017-11-28 17:20   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-11-28 17:20 UTC (permalink / raw)
  To: David Howells; +Cc: David S. Miller, netdev, linux-kernel


Quoting David Howells <dhowells@redhat.com>:

> Gustavo A. R. Silva <garsilva@embeddedor.com> wrote:
>
>> -		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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-28 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 18:08 [PATCH] rxrpc: call_event: Fix variable overwrite in __rxrpc_propose_ACK Gustavo A. R. Silva
2017-11-28 16:06 ` David Howells
2017-11-28 17:20   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).