From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456AbdK0S4D (ORCPT ); Mon, 27 Nov 2017 13:56:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56294 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932429AbdK0S4C (ORCPT ); Mon, 27 Nov 2017 13:56:02 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20171127180207.GA25428@embeddedor.com> References: <20171127180207.GA25428@embeddedor.com> To: "Gustavo A. R. Silva" Cc: dhowells@redhat.com, "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rxrpc: sendmsg: Fix variable overwrite in rxrpc_queue_packet MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17003.1511808959.1@warthog.procyon.org.uk> Date: Mon, 27 Nov 2017 18:55:59 +0000 Message-ID: <17004.1511808959@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 27 Nov 2017 18:56:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gustavo A. R. Silva 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