[PATCH] nvme: avoid wrapping admin_timeout and io_timeout
Olson, Marc
marcolso at amazon.com
Fri Nov 6 10:01:25 PST 2026
> Fixes: 8ae4e4477d8f ("nvme: update timeout module parameter type")
Makes sense. I suspect very few (if any) users choose a value between
UINT_MAX/HZ and UINT_MAX, which is why this went unnoticed until now.
The documented EBS io_timeout=4294967295 only worked because
UINT_MAX * HZ happens to wrap to UINT_MAX - HZ + 1.
The fw activation wait also got worse with 6cf828d2fbeb. The old
msecs_to_jiffies(admin_timeout * 1000) clamped the wrapped value to
MAX_JIFFY_OFFSET, but secs_to_jiffies() doesn't. On 32-bit with a large
admin timeout and no MTFA the deadline is already expired and we reset
the controller. So also:
Fixes: 6cf828d2fbeb ("nvme: convert timeouts to secs_to_jiffies()")
Reviewed-by: Marc Olson <marcolso at amazon.com>
More information about the Linux-nvme
mailing list