summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/fc.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2018-10-08 14:28:52 -0700
committerChristoph Hellwig <hch@lst.de>2018-10-17 08:58:27 +0200
commit8eacd1bd21d6913ec27e6120e9a8733352e191d3 (patch)
tree135e3d5ab85f31659294bbaab1290e638e149bab /drivers/nvme/host/fc.c
parent0d3ebdec9394c984f3aa59ea97541f2243952b55 (diff)
downloadlinux-8eacd1bd21d6913ec27e6120e9a8733352e191d3.tar.bz2
nvmet: avoid integer overflow in the discard code
Although I'm not sure whether it is a good idea to support large discard commands, I think integer overflow for discard ranges larger than 4 GB should be avoided. This patch avoids that smatch reports the following: drivers/nvme/target/io-cmd-file.c:249:1 nvmet_file_execute_discard() warn: should '((range.nlb)) << req->ns->blksize_shift' be a 64 bit type? Fixes: d5eff33ee6f8 ("nvmet: add simple file backed ns support") Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/fc.c')
0 files changed, 0 insertions, 0 deletions