tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ubc_uiomove returns EINVAL
Chuck Silvers <chuq%chuq.com@localhost> wrote:
> the caller of uvm_fault() will arrange for kcopy(), copyin(), etc, to return
> the error returned from uvm_fault(), which is probably coming from
> VOP_GETPAGES() of the vnode you're trying to access with ubc_uiomove().
That's it. In my case, it comes from here in genfs_getpages(), because I read
beyond EOF without PGO_PASTEOF:
if (origoffset + (ap->a_centeridx << PAGE_SHIFT) >= memeof) {
if ((flags & PGO_LOCKED) == 0) {
mutex_exit(uobj->vmobjlock);
}
UVMHIST_LOG(ubchist, "off 0x%x count %d goes past EOF 0x%x",
origoffset, *ap->a_count, memeof,0);
error = EINVAL;
goto out_err;
}
Indeed I expectec ubc_uiomove to prepare a zero-filled area when requested
offsets beyond EOF. But I see no way to have PGO_PASTEOF set from
ubc_uiomove().
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index