kernel-fxtec-pro1x/drivers/nvme/target
Bart Van Assche 2f1e4e65ba nvmet: avoid integer overflow in the discard code
[ Upstream commit 8eacd1bd21d6913ec27e6120e9a8733352e191d3 ]

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: d5eff33ee6 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-01 09:16:29 +01:00
..
admin-cmd.c nvmet: fix data units read and written counters in SMART log 2019-10-05 13:09:52 +02:00
configfs.c for-4.19/block-20180812 2018-08-14 10:23:25 -07:00
core.c nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-05-08 07:21:44 +02:00
discovery.c nvmet-rdma: support max(16KB, PAGE_SIZE) inline data 2018-07-23 09:35:16 +02:00
fabrics-cmd.c nvmet: remove duplicate NULL initialization for req->ns 2018-05-25 16:50:12 +02:00
fc.c nvmet-fc: fix target sgl list on large transfers 2018-07-24 13:44:09 +02:00
fcloop.c nvme-fcloop: Fix dropped LS's to removed target port 2018-08-28 08:40:43 +02:00
io-cmd-bdev.c nvmet: fix data_len to 0 for bdev-backed write_zeroes 2019-06-25 11:35:58 +08:00
io-cmd-file.c nvmet: avoid integer overflow in the discard code 2019-12-01 09:16:29 +01:00
Kconfig nvmet-rdma: depend on INFINIBAND_ADDR_TRANS 2018-04-27 11:15:43 -04:00
loop.c nvmet-loop: Flush nvme_delete_wq when removing the port 2019-09-06 10:21:55 +02:00
Makefile nvmet: add simple file backed ns support 2018-05-25 16:50:12 +02:00
nvmet.h nvmet: add ns write protect support 2018-08-08 12:00:53 +02:00
rdma.c nvmet-rdma: fix null dereference under heavy load 2019-01-31 08:14:41 +01:00