Skip to content
Commit 8609c63f authored by Bart Van Assche's avatar Bart Van Assche Committed by Christoph Hellwig
Browse files

nvme: fix handling of large MDTS values



Instead of triggering an integer overflow and undefined behavior if MDTS is
large, set max_hw_sectors to UINT_MAX.

Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
[hch: rebased to account for the new nvme_mps_to_sectors helper]
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 5befc7c2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment