diff options
author | Toshi Kani <toshi.kani@hpe.com> | 2017-07-07 23:44:26 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-27 22:08:02 (GMT) |
commit | 0fa705dc61ee12e09827ac19225be3731b1cb988 (patch) | |
tree | 81cdb0f20ed1cc72256b5b91015fa4a67a0d47e2 /usr/gen_init_cpio.c | |
parent | 891c31e16cb7aab2356625444f3eedebb96cde00 (diff) | |
download | linux-0fa705dc61ee12e09827ac19225be3731b1cb988.tar.xz |
libnvdimm: fix badblock range handling of ARS range
commit 4e3f0701f25ab194c5362576b1146a1e6cc6c2e7 upstream.
__add_badblock_range() does not account sector alignment when
it sets 'num_sectors'. Therefore, an ARS error record range
spanning across two sectors is set to a single sector length,
which leaves the 2nd sector unprotected.
Change __add_badblock_range() to set 'num_sectors' properly.
Fixes: 0caeef63e6d2 ("libnvdimm: Add a poison list and export badblocks")
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'usr/gen_init_cpio.c')
0 files changed, 0 insertions, 0 deletions