From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbdKUDIJ (ORCPT ); Mon, 20 Nov 2017 22:08:09 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:35408 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbdKUDII (ORCPT ); Mon, 20 Nov 2017 22:08:08 -0500 To: Arnd Bergmann Cc: Adam Radford , "James E.J. Bottomley" , "Martin K. Petersen" , Sumit Saxena , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] scsi: 3w-9xxx: rework lock timeouts From: "Martin K. Petersen" Organization: Oracle Corporation References: <20171110155840.1941250-1-arnd@arndb.de> <20171110155840.1941250-3-arnd@arndb.de> Date: Mon, 20 Nov 2017 22:07:58 -0500 In-Reply-To: <20171110155840.1941250-3-arnd@arndb.de> (Arnd Bergmann's message of "Fri, 10 Nov 2017 16:58:27 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd, > The TW_IOCTL_GET_LOCK ioctl uses do_gettimeofday() to check whether a > lock has expired. This can misbehave due to a concurrent > settimeofday() call, as it is based on 'real' time, and it will > overflow in y2038 on 32-bit architectures, producing unexpected > results when used across the overflow time. > > This changes it to using monotonic time, using ktime_get() to simplify > the code. Applied to 4.16/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering