Re: [PATCH 3/3] scsi: 3w-9xxx: rework lock timeouts

2017-11-20 Thread Martin K. Petersen
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 t

Re: [PATCH 3/3] scsi: 3w-9xxx: rework lock timeouts

2017-11-10 Thread adam radford
On Fri, Nov 10, 2017 at 7:58 AM, Arnd Bergmann wrote: > 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, pr

[PATCH 3/3] scsi: 3w-9xxx: rework lock timeouts

2017-11-10 Thread Arnd Bergmann
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.