Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177557101
D31156.1794714304.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
723 B
Referenced Files
None
Subscribers
None
D31156.1794714304.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
Sun, Nov 15, 3:45 AM (7 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41737252
Default Alt Text
D31156.1794714304.diff (723 B)
Attached To
Mode
D31156: vmm: Add credential to cdev object
Attached
Detach File
Event Timeline