On Sun, Sep 8, 2013 at 6:24 PM, Ed Schouten <[email protected]> wrote: > 2013/9/7 Davide Italiano <[email protected]>: >> Log: >> - 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) > > Wait. This piece of code is never used on FreeBSD HEAD, right? See > dtrace_load.c: > > #if __FreeBSD_version < 800039 > /* Enable device cloning. */ > clone_setup(&dtrace_clones); > > /* Setup device cloning events. */ > eh_tag = EVENTHANDLER_REGISTER(dev_clone, dtrace_clone, 0, > 1000); > #else > dtrace_dev = make_dev(&dtrace_cdevsw, 0, UID_ROOT, GID_WHEEL, > 0600, > "dtrace/dtrace"); > helper_dev = make_dev(&helper_cdevsw, 0, UID_ROOT, GID_WHEEL, > 0660, > "dtrace/helper"); > #endif > > -- > Ed Schouten <[email protected]>
Hi Ed, yes, you're right that's never used. I put that there only for consistency with the behaviour of other drivers. I think it's not good to leave examples of racy patterns, even if the code is not built anymore. If you have any kind of objections, I'll revert that. That said, let me clarify things a bit. Originally my goal was that of moving every clone handler to cdevpriv(9), but unfortunately 10 slush/freeze approached quicker than I expected, so I preferred to fix at least this racy behaviour before 10.0 release. I hope to start with this conversion when HEAD will be open for commit again, but that's not a priority. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
