Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151240665
D31156.id92118.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
723 B
Referenced Files
None
Subscribers
None
D31156.id92118.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
@@ -1015,6 +1015,11 @@
error = EINVAL;
goto out;
}
+ if (cr_cansee(curthread->td_ucred, sc->cdev->si_cred)) {
+ mtx_unlock(&vmmdev_mtx);
+ error = EINVAL;
+ goto out;
+ }
/*
* The 'cdev' will be destroyed asynchronously when 'si_threadcount'
@@ -1117,8 +1122,8 @@
goto out;
}
- error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &vmmdevsw, NULL,
- UID_ROOT, GID_WHEEL, 0600, "vmm/%s", buf);
+ error = make_dev_p(MAKEDEV_CHECKNAME, &cdev, &vmmdevsw,
+ curthread->td_ucred, UID_ROOT, GID_WHEEL, 0600, "vmm/%s", buf);
if (error != 0) {
vmmdev_destroy(sc);
goto out;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 1:42 AM (12 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31064568
Default Alt Text
D31156.id92118.diff (723 B)
Attached To
Mode
D31156: vmm: Add credential to cdev object
Attached
Detach File
Event Timeline
Log In to Comment