[PATCH] nvme-pci: fix HMB size calculation

Keith Busch keith.busch at intel.com
Tue Jul 25 08:50:36 PDT 2017


On Tue, Jul 25, 2017 at 05:41:34PM +0200, Christoph Hellwig wrote:
> 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 at lst.de>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Fixes: 87ad72a59a38 ("nvme-pci: implement host memory buffer support")

Looks good.

Reviewed-by: Keith Busch <keith.busch at intel.com>



More information about the Linux-nvme mailing list