Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106964285
D37273.id113313.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
544 B
Referenced Files
None
Subscribers
None
D37273.id113313.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D37273: vmm devmem_mmap_single: Bump object reference under memsegs lock.
Attached
Detach File
Event Timeline
Log In to Comment