diff options
author | davide <davide@FreeBSD.org> | 2013-09-07 13:45:44 +0000 |
---|---|---|
committer | davide <davide@FreeBSD.org> | 2013-09-07 13:45:44 +0000 |
commit | ec6382d0c26c20bd51fe82da2429500f6a034707 (patch) | |
tree | 6e614255289b5312f626893bca4618a0e9379c04 /sys/dev/firewire | |
parent | eb5a66191bbcd3ddd0b695b32e9bd837c356027d (diff) | |
download | FreeBSD-src-ec6382d0c26c20bd51fe82da2429500f6a034707.zip FreeBSD-src-ec6382d0c26c20bd51fe82da2429500f6a034707.tar.gz |
- 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
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r-- | sys/dev/firewire/fwdev.c | 8 |
1 files changed, 3 insertions, 5 deletions
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; } |