Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp336818imm; Wed, 11 Jul 2018 03:25:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfnuRccNDPZ4xyKqsjIKcLIqFfBMQaxsiIb4Po63BkXAeZLBzDkzcK7HAWD1uOCJou8FkRE X-Received: by 2002:aa7:8118:: with SMTP id b24-v6mr2353704pfi.78.1531304704523; Wed, 11 Jul 2018 03:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531304704; cv=none; d=google.com; s=arc-20160816; b=etmcprStw6I4DmvYWVpTmNc+6pUdwFXxBJXBhjwEzAOTRZZPb6H+8qe2/LD+rogG9j ATxK1unfyIrQfMqIqy0wA3lva5I7pbGlqTmAsglAMH3OofhpYFkVk+ZB3vssy/cwmVJZ a/XvWq+hUDjQZA8MERVPR6RRO1Qhntqt/7oP8J4B/51HshvgUj1o7rJy4yZh4PI1evsQ /5iB8qxoVWBf2usVxVkA7TeY1SmjXNRNZsqv3luOVCltjXmeZD5TwKvhjqDRQKukaeL5 629xDvF/7zN8YsyU+sxEGLh/mkb6OIKsYXm7zfky8VPtIo7CQbTEUVezG8+71y1uSeQu aHYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=1yHpwg71uPzYAl4G2h44xEqqE2Imo+uqZwHdooY7DZs=; b=dYNu+QuljAgTsILHCy43utcX0jZuDC/1aJb2+IRFoECe6AZan0RR8suM8YRYWlX3Le ANkUqNsGIKKuGWYSbH1JFWmdoCZFDA1vlKA07APyu/YPDBoGEsdyNZ4ooc5998crV6xX Q50NXOU5twziQaHi31fYObznNF2CCg0YLtWaRd4D5V15yNR5DZOBchgODIWV0XZxC12r kG3epZE3+EowUplh+MY1nuaOLx40vfTR8s0pfJ7jf/GMuJYk0mFbPOTwJ2j9Qd4dcCQQ 1TVvLPxjnaqjBcqiTGk4ZjOeTfGEYnf5TUpszepH7zcsi2SlWj06Kt/8YUzqmkQvhMLl Y9Wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25-v6si18011230pge.104.2018.07.11.03.24.49; Wed, 11 Jul 2018 03:25:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732516AbeGKKYG (ORCPT + 99 others); Wed, 11 Jul 2018 06:24:06 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:40601 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732499AbeGKKYF (ORCPT ); Wed, 11 Jul 2018 06:24:05 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lnopk-1gIpVx2qO8-00fwBt; Wed, 11 Jul 2018 12:20:17 +0200 From: Arnd Bergmann To: Steffen Klassert , Herbert Xu , "David S. Miller" Cc: Arnd Bergmann , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] [RESEND, net-next] ipv6: xfrm: use 64-bit timestamps Date: Wed, 11 Jul 2018 12:19:14 +0200 Message-Id: <20180711101941.4039411-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180711101941.4039411-1-arnd@arndb.de> References: <20180711101941.4039411-1-arnd@arndb.de> X-Provags-ID: V03:K1:oPTogUBpFHn0fyK8ppcY26kg3RNuctUI+j2Z/4enDutxGpW9bSv MISQcAq/LbXnIPpjHy94HA/Hu9VlP6e585Z4JCtAJD4PaIlhr2Z8WOborRNrFjA7FT2v8TP 9om3d0nYNXsdokWvm33H04GUI1ZIQ3SJUwrUVP1HtQ/U8QR2PhqzVjEQm6wcO4cVfaVrBty nMkcZtC+iHoSPsPTWR2lQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:E7NASbAE02s=:gQJKalm6BOP3IqAvN8tsF9 AhKkb4S+54c/yaarIDeD2I7emUBuosxh8hW1HB8uigzJFmK9/fBeFA5ZrSzcg82oO3VxEP7w0 4EQa4dy2lNp8HUspUN3SFYLTzh3xGvj16sM5hHHF+CAOvN1/kYwz0GCSoO2obWCC4ZNDnw83e 8FQmgU7f6fmovRC/P5i41RE2fw/08LQSmCNn+rqO1G5kh9fM8+0LCrLEwuVFv9X4YQgMpbnm9 Ru8VxnIZEuV4T732SKAGnKvEHPvikgfPe91IKb3J/DusXTH201EVIoziWS9BBiApUEteXr0xL bzxBlnFc4VBPKST5RZ4+cv/lJ59nVgdFBa57ngdAqKrx8HDdVfZR3yLZCblOxZbWw1QVvalvG mxi+5nz1LDHQlNsQNg4HKwKXb500gLtf6fnjdW8tpTn3bivq7xPVC+/NU4FwBgovi3DBExvx/ Tmn+bW2GWEOGuCRkrJMSljlYcLaYkHpcbEMQIVx0PCrlWd+ZZGB9KJsnfZpcmiTZBmZ1cmZyJ sQks/MiJSvdMK2yKR9+PRx07jIh5y7Ym31nfm0+SNCUfqZdSOhIQEyNLLTVt+u5WemRoBN8nL LynxuhUFVdBkmhKMXOM8z1z7H9W6+YVhoidttMWMHbp65gX8S3PvKb8a6U9+y3BlIXty3QDFD UQTkVxlgDrqeyiEAcLqUf7HJ6WF3LJQrlo07kx7AJnoaw3qlOqBbT0scssYHglwCAYic= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org get_seconds() is deprecated because it can overflow on 32-bit architectures. For the xfrm_state->lastused member, we treat the data as a 64-bit number already, so we just need to use the right accessor that works on both 32-bit and 64-bit machines. Signed-off-by: Arnd Bergmann --- include/net/xfrm.h | 2 +- net/ipv6/xfrm6_mode_ro.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 51cc475b87e0..d704b662a94b 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -227,7 +227,7 @@ struct xfrm_state { long saved_tmo; /* Last used time */ - unsigned long lastused; + time64_t lastused; struct page_frag xfrag; diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c index 07d36573f50b..da28e4407b8f 100644 --- a/net/ipv6/xfrm6_mode_ro.c +++ b/net/ipv6/xfrm6_mode_ro.c @@ -55,7 +55,7 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb) __skb_pull(skb, hdr_len); memmove(ipv6_hdr(skb), iph, hdr_len); - x->lastused = get_seconds(); + x->lastused = ktime_get_real_seconds(); return 0; } -- 2.9.0