From ec6382d0c26c20bd51fe82da2429500f6a034707 Mon Sep 17 00:00:00 2001 From: davide Date: Sat, 7 Sep 2013 13:45:44 +0000 Subject: - Use make_dev_credf(MAKEDEV_REF) instead of the race-prone make_dev()+ dev_ref() in the clone handlers that still use it. - Don't set SI_CHEAPCLONE flag, it's not used anywhere neither in devfs (for anything real) Reviewed by: kib --- sys/dev/firewire/fwdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys/dev/firewire') diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c index 1475d00..d26810d 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -992,11 +992,9 @@ found: sc = devclass_get_softc(firewire_devclass, unit); if (sc == NULL) return; - *dev = make_dev(&firewire_cdevsw, MAKEMINOR(devflag[i], unit, sub), - UID_ROOT, GID_OPERATOR, 0660, - "%s%d.%d", devnames[i], unit, sub); - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; + *dev = make_dev_credf(MAKEDEV_REF, &firewire_cdevsw, + MAKEMINOR(devflag[i], unit, sub), cred, UID_ROOT, GID_OPERATOR, + 0660, "%s%d.%d", devnames[i], unit, sub); dev_depends(sc->dev, *dev); return; } -- cgit v1.1