]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Fix divide-by-zero in nvme_trans_io_get_num_cmds
authorKeith Busch <keith.busch@intel.com>
Mon, 24 Mar 2014 14:03:56 +0000 (10:03 -0400)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Mon, 24 Mar 2014 14:03:56 +0000 (10:03 -0400)
commit453e260d9e6b47f4eac89e0242a90fae677d414b
tree077548a5b838e231dc10783079ccf2360b072a04
parentb3104dc57bd1d03c354faa9fc13d74cf069981b4
NVMe: Fix divide-by-zero in nvme_trans_io_get_num_cmds

dev->max_hw_sectors may be zero to indicate the device has no limit on
the number of sectors.  nvme_trans_do_nvme_io() should use the software
limit, since this is guaranteed to be non-zero.

Reported-by: Mundu <mundu2510@gmail.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme-scsi.c