summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2020-01-11 20:57:43 +0800
committerJens Axboe <axboe@kernel.dk>2020-01-14 13:37:40 -0700
commit4a2f704eb2d831a2d73d7f4cdd54f45c49c3c353 (patch)
tree8ff8c6a1e1c0311dba3b81a9482dc5ea87ed456f /include/linux/blkdev.h
parente17016f6dcb047f91a8fc9f46bbf81a21d15ca73 (diff)
block: fix get_max_segment_size() overflow on 32bit arch
Commit 429120f3df2d 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: 429120f3df2d ("block: fix splitting segments on boundary masks") Reported-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Cc: Christoph Hellwig <hch@lst.de> Tested-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
0 files changed, 0 insertions, 0 deletions