[PATCH 5.0 027/137] libnvdimm/pmem: fix a possible OOB access when read and write pmem