-
由 James Bottomley 提交于
Hugh Dickens noticed that SMART commands issued from user space can end up corupting memory. The problem occurs if the buffer used to read data spans two pages. The reason is that the PIO sector routines in libata are expecting physically contiguous pages when they do sector operations, so the left overs on the second page go into the next physically adjacent page rather than the next page in the sg mapping. Fix this by enforcing strict 512 byte alignment on all buffers from userspace. Acked-by: NHugh Dickins <hugh@veritas.com> Acked-by: NJeff Garzik <jeff@garzik.org> Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
d0ad3bc9