diff options
author | Christoph Hellwig <hch@lst.de> | 2017-07-25 18:39:07 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-07-25 19:05:33 +0300 |
commit | 50cdb7c61b019a732fe34635a7cbf2a7487f5e90 (patch) | |
tree | 4e16a6fd0279620ac8960893abe7d72901a4c165 /crypto | |
parent | 9c5358e15ca12ed3dc3b1e51671dee5d155de8e0 (diff) | |
download | linux-50cdb7c61b019a732fe34635a7cbf2a7487f5e90.tar.xz |
nvme-pci: fix HMB size calculation
It's possible the preferred HMB size may not be a multiple of the
chunk_size. This patch moves len to function scope and uses that in
the for loop increment so the last iteration doesn't cause the total
size to exceed the allocated HMB size.
Based on an earlier patch from Keith Busch.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Fixes: 87ad72a59a38 ("nvme-pci: implement host memory buffer support")
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions