Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154232303
D46447.id142574.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46447.id142574.diff
View Options
diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c
--- a/sys/dev/vmm/vmm_dev.c
+++ b/sys/dev/vmm/vmm_dev.c
@@ -152,7 +152,7 @@
}
static struct vmmdev_softc *
-vmmdev_lookup(const char *name)
+vmmdev_lookup(const char *name, struct ucred *cred)
{
struct vmmdev_softc *sc;
@@ -166,7 +166,7 @@
if (sc == NULL)
return (NULL);
- if (cr_cansee(curthread->td_ucred, sc->ucred))
+ if (cr_cansee(cred, sc->ucred))
return (NULL);
return (sc);
@@ -786,7 +786,7 @@
struct vmmdev_softc *sc;
mtx_lock(&vmmdev_mtx);
- sc = vmmdev_lookup(name);
+ sc = vmmdev_lookup(name, cred);
if (sc == NULL || sc->cdev == NULL) {
mtx_unlock(&vmmdev_mtx);
return (EINVAL);
@@ -860,7 +860,7 @@
int error;
mtx_lock(&vmmdev_mtx);
- sc = vmmdev_lookup(name);
+ sc = vmmdev_lookup(name, cred);
mtx_unlock(&vmmdev_mtx);
if (sc != NULL)
return (EEXIST);
@@ -876,7 +876,7 @@
* dropped the lock.
*/
mtx_lock(&vmmdev_mtx);
- sc2 = vmmdev_lookup(name);
+ sc2 = vmmdev_lookup(name, cred);
if (sc2 != NULL) {
mtx_unlock(&vmmdev_mtx);
vmmdev_destroy(sc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 7:31 AM (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32249953
Default Alt Text
D46447.id142574.diff (1 KB)
Attached To
Mode
D46447: vmm: Be more consistent with the credential used for VM lookup
Attached
Detach File
Event Timeline
Log In to Comment