Page MenuHomeFreeBSD

D42008.id128124.diff
No OneTemporary

D42008.id128124.diff

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

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)

Event Timeline