devobj: allow read only device file mappings (OFED 3.3 support)

This commit is contained in:
Balazs Gerofi
2016-06-21 06:57:47 +09:00
parent d90900b6e6
commit a83ad620c8
4 changed files with 11 additions and 6 deletions

View File

@ -1108,7 +1108,7 @@ do_mmap(const intptr_t addr0, const size_t len0, const int prot,
vrflags &= ~VR_MEMTYPE_MASK;
vrflags |= VR_MEMTYPE_UC;
}
error = devobj_create(fd, len, off, &memobj, &maxprot);
error = devobj_create(fd, len, off, &memobj, &maxprot, prot);
}
if (error) {
ekprintf("do_mmap:fileobj_create failed. %d\n", error);