android_kernel_xiaomi_sm7250/drivers/nvdimm
Chris Ye 1edcdff8a8 nvdimm: Fix badblocks clear off-by-one error
commit ef9102004a87cb3f8b26e000a095a261fc0467d3 upstream.

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: 23f4984483 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-07 17:35:09 +02:00
..
badrange.c
blk.c
btt_devs.c
btt.c
btt.h
bus.c
claim.c
core.c
dax_devs.c
dimm_devs.c
dimm.c
e820.c
Kconfig
label.c
label.h
Makefile
namespace_devs.c
nd-core.h
nd.h
of_pmem.c
pfn_devs.c
pfn.h
pmem.c
pmem.h
region_devs.c
region.c