lkml.org 
[lkml]   [2017]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet
Date
Gustavo A. R. Silva <garsilva@embeddedor.com> wrote:

> Value assigned to variable resend_at is overwritten before it can be used.
>
> Fix this by removing the value overwrite as it seems that this is a
> leftover code.

NAK. Your fix will actually cause the code to break.

The resend_at value used for the timer must be based on the current time
(ie. jiffies in this case), so we can't simply remove that line as the
previously calculated resend_at value is a duration, not a time.

What you need to do is to instead modify the line you wanted to remove to add
'now' to the previously-computed value.

David

\
 
 \ /
  Last update: 2017-11-27 19:59    [W:0.070 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site