Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102670766
D42008.id128124.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
821 B
Referenced Files
None
Subscribers
None
D42008.id128124.diff
View Options
diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c
--- a/sys/dev/vkbd/vkbd.c
+++ b/sys/dev/vkbd/vkbd.c
@@ -191,6 +191,8 @@
*dev = make_dev_credf(MAKEDEV_REF, &vkbd_dev_cdevsw, unit,
cred, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d",
unit);
+ else
+ dev_ref(*dev);
}
/* Open device */
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -548,6 +548,7 @@
if (i != 0)
i = tun_create_device(drv, unit, NULL, &dev, name);
if (i == 0) {
+ dev_ref(dev);
tuncreate(dev);
struct tuntap_softc *tp = dev->si_drv1;
*ifpp = tp->tun_ifp;
@@ -611,8 +612,10 @@
i = tun_create_device(drv, u, cred, dev, name);
}
- if (i == 0)
+ if (i == 0) {
+ dev_ref(*dev);
if_clone_create(name, namelen, NULL);
+ }
out:
CURVNET_RESTORE();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 3:44 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14660825
Default Alt Text
D42008.id128124.diff (821 B)
Attached To
Mode
D42008: tun/tap: correct ref count on cloned cdevs
Attached
Detach File
Event Timeline
Log In to Comment