linux-stable/drivers/nvme
Jaesoo Lee 0e6a89a37a nvme: Fix u32 overflow in the number of namespace list calculation
[ Upstream commit c8e8c77b3b ]

The Number of Namespaces (nn) field in the identify controller data structure is
defined as u32 and the maximum allowed value in NVMe specification is
0xFFFFFFFEUL. This change fixes the possible overflow of the DIV_ROUND_UP()
operation used in nvme_scan_ns_list() by casting the nn to u64.

Signed-off-by: Jaesoo Lee <jalee@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-10 09:55:32 +02:00
..
host nvme: Fix u32 overflow in the number of namespace list calculation 2019-07-10 09:55:32 +02:00
target nvme-loop: init nvmet_ctrl fatal_err_work when allocate 2019-05-08 07:19:08 +02:00
Kconfig nvmet: add a generic NVMe target 2016-07-05 11:30:33 -06:00
Makefile nvmet: add a generic NVMe target 2016-07-05 11:30:33 -06:00