Page MenuHomeFreeBSD

D37273.id113313.diff
No OneTemporary

D37273.id113313.diff

diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c
--- a/sys/amd64/vmm/vmm_dev.c
+++ b/sys/amd64/vmm/vmm_dev.c
@@ -1262,15 +1262,13 @@
KASSERT(error == 0 && !sysmem && *objp != NULL,
("%s: invalid devmem segment %d", __func__, dsc->segid));
+ if (seglen >= last)
+ vm_object_reference(*objp);
+ else
+ error = EINVAL;
vm_unlock_memsegs(dsc->sc->vm);
-
- if (seglen >= last) {
- vm_object_reference(*objp);
- return (0);
- } else {
- return (EINVAL);
- }
+ return (error);
}
static struct cdevsw devmemsw = {

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 4:31 AM (6 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15723791
Default Alt Text
D37273.id113313.diff (544 B)

Event Timeline