https://github.com/torvalds/linux
Revision c8e8c77b3bdbade6e26e8e76595f141ede12b692 authored by Jaesoo Lee on 03 June 2019, 23:42:28 UTC, committed by Sagi Grimberg on 06 June 2019, 16:53:07 UTC
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>
1 parent 3562f5d
History
Tip revision: c8e8c77b3bdbade6e26e8e76595f141ede12b692 authored by Jaesoo Lee on 03 June 2019, 23:42:28 UTC
nvme: Fix u32 overflow in the number of namespace list calculation
Tip revision: c8e8c77
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.6 KB
.mailmap -rw-r--r-- 11.9 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.9 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 563 bytes
MAINTAINERS -rw-r--r-- 498.7 KB
Makefile -rw-r--r-- 59.0 KB
README -rw-r--r-- 727 bytes

README

back to top