Skip to content
Commit 07ffd4ce authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Martin K. Petersen
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarAdam Radford <aradford@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bc8f9166
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment