Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: fix get_max_segment_size() overflow on 32bit arch
Commit 429120f starts to take account of segment's start dma address when computing max segment size, and data type of 'unsigned long' is used to do that. However, the segment mask may be 0xffffffff, so the figured out segment size may be overflowed in case of zero physical address on 32bit arch. Fix the issue by returning queue_max_segment_size() directly when that happens. Fixes: 429120f ("block: fix splitting segments on boundary masks") Reported-by: Guenter Roeck <[email protected]> Tested-by: Guenter Roeck <[email protected]> Cc: Christoph Hellwig <[email protected]> Tested-by: Steven Rostedt (VMware) <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information