Date: Sun, 8 Sep 2013 18:50:20 +0200 From: Davide Italiano <davide@freebsd.org> To: Ed Schouten <ed@80386.nl> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r255359 - in head/sys: cddl/dev/dtrace dev/firewire dev/vkbd security/audit Message-ID: <CACYV=-GFJerL%2BLg_S8UcRVgXEyxVnF_p%2B9dSBLSi070CTaLV3w@mail.gmail.com> In-Reply-To: <CAJOYFBAmmmd29N_W%2ByFK3m=z0otF47dWO2Kd4w42aQcCCt59bg@mail.gmail.com> References: <201309071345.r87Djj0P003439@svn.freebsd.org> <CAJOYFBAmmmd29N_W%2ByFK3m=z0otF47dWO2Kd4w42aQcCCt59bg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 8, 2013 at 6:24 PM, Ed Schouten <ed@80386.nl> wrote: > 2013/9/7 Davide Italiano <davide@freebsd.org>: >> 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 <ed@80386.nl> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACYV=-GFJerL%2BLg_S8UcRVgXEyxVnF_p%2B9dSBLSi070CTaLV3w>