]> git.baikalelectronics.ru Git - kernel.git/commit
nvdimm: Fix badblocks clear off-by-one error
authorChris Ye <chris.ye@intel.com>
Wed, 1 Jun 2022 00:09:54 +0000 (17:09 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 24 Jun 2022 18:57:19 +0000 (11:57 -0700)
commit0aee6638d47ca889253f2497500af9347f2f4d92
tree48ed6a2026e49edcda4ae2ec06a5ca962eaa2d08
parent4764e99deee460568d59e6c88fcf402440c6a616
nvdimm: Fix badblocks clear off-by-one error

nvdimm_clear_badblocks_region() validates badblock clearing requests
against the span of the region, however it compares the inclusive
badblock request range to the exclusive region range. Fix up the
off-by-one error.

Fixes: 0d522171df6b ("libnvdimm: rework region badblocks clearing")
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ye <chris.ye@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Link: https://lore.kernel.org/r/165404219489.2445897.9792886413715690399.stgit@dwillia2-xfh
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/bus.c