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/cddl/dev/dtrace | |
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/cddl/dev/dtrace')
-rw-r--r-- | sys/cddl/dev/dtrace/dtrace_clone.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/cddl/dev/dtrace/dtrace_clone.c b/sys/cddl/dev/dtrace/dtrace_clone.c index be1e3d4..5009e9d 100644 --- a/sys/cddl/dev/dtrace/dtrace_clone.c +++ b/sys/cddl/dev/dtrace/dtrace_clone.c @@ -52,10 +52,6 @@ dtrace_clone(void *arg, struct ucred *cred, char *name, int namelen, struct cdev /* Clone the device to the new minor number. */ if (clone_create(&dtrace_clones, &dtrace_cdevsw, &u, dev, 0) != 0) /* Create the /dev/dtrace/dtraceNN entry. */ - *dev = make_dev_cred(&dtrace_cdevsw, u, cred, + *dev = make_dev_credf(MAKEDEV_REF, &dtrace_cdevsw, u, cred, UID_ROOT, GID_WHEEL, 0600, "dtrace/dtrace%d", u); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } } |