summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-9xxx.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-11-10 16:58:27 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-12-04 20:32:53 -0500
commit07ffd4ce80b9a452d8c8eb154924e19499302d00 (patch)
treeaccc9c2cca61f6f9b816a63d9b0e629a5b917add /drivers/scsi/3w-9xxx.h
parentbc8f91665b3f2fd94b80217e433dc90383e75ae4 (diff)
downloadlinux-07ffd4ce80b9a452d8c8eb154924e19499302d00.tar.bz2
scsi: 3w-9xxx: rework lock timeouts
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. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/3w-9xxx.h')
-rw-r--r--drivers/scsi/3w-9xxx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/3w-9xxx.h b/drivers/scsi/3w-9xxx.h
index b6c208cc474f..d88cd3499bd5 100644
--- a/drivers/scsi/3w-9xxx.h
+++ b/drivers/scsi/3w-9xxx.h
@@ -666,7 +666,7 @@ typedef struct TAG_TW_Device_Extension {
unsigned char event_queue_wrapped;
unsigned int error_sequence_id;
int ioctl_sem_lock;
- u32 ioctl_msec;
+ ktime_t ioctl_time;
int chrdev_request_id;
wait_queue_head_t ioctl_wqueue;
struct mutex ioctl_lock;