[PATCH for v4.9 LTS 67/86] pmem: return EIO on read_pmem() failure

2017-06-17 Thread Levin, Alexander (Sasha Levin)
From: Stefan Hajnoczi [ Upstream commit d47d1d27fd6206c18806440f6ebddf51a806be4f ] The read_pmem() function uses memcpy_mcsafe() on x86 where an EFAULT error code indicates a failed read. Block I/O should use EIO to indicate failure. Other pmem code paths (like bad

[PATCH for v4.9 LTS 67/86] pmem: return EIO on read_pmem() failure

2017-06-17 Thread Levin, Alexander (Sasha Levin)
From: Stefan Hajnoczi [ Upstream commit d47d1d27fd6206c18806440f6ebddf51a806be4f ] The read_pmem() function uses memcpy_mcsafe() on x86 where an EFAULT error code indicates a failed read. Block I/O should use EIO to indicate failure. Other pmem code paths (like bad blocks) already use EIO so