Date: Tue, 30 Dec 2014 23:41:48 +0100 From: Mateusz Guzik <mjguzik@gmail.com> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r276341 - head/sys/kern Message-ID: <20141230224148.GB27329@dft-labs.eu> In-Reply-To: <20141230221243.GH15484@FreeBSD.org> References: <201412281924.sBSJO284028980@svn.freebsd.org> <20141230200601.GF15484@FreeBSD.org> <20141230202226.GA27329@dft-labs.eu> <20141230221243.GH15484@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 31, 2014 at 01:12:43AM +0300, Gleb Smirnoff wrote: > On Tue, Dec 30, 2014 at 09:22:27PM +0100, Mateusz Guzik wrote: > M> On Tue, Dec 30, 2014 at 11:06:01PM +0300, Gleb Smirnoff wrote: > M> > On Sun, Dec 28, 2014 at 07:24:02PM +0000, Mateusz Guzik wrote: > M> > M> Author: mjg > M> > M> Date: Sun Dec 28 19:24:01 2014 > M> > M> New Revision: 276341 > M> > M> URL: https://svnweb.freebsd.org/changeset/base/276341 > M> > M> > M> > M> Log: > M> > M> sysctl: don't modify oid_running for static nodes > M> > M> > M> > M> It is necessary to prevent nodes from being destroyed while used, but static > M> > M> ones cannot be destroyed. > M> > > M> > What about nodes that go away on kernel module unload? Not sure > M> > they were protected properly before your commit, though :) > M> > > M> > M> They are not static. > > I don't see how they can get CTLFLAG_DYN. Look for any (un)loadable > modules as an example, e.g. aio(4) implemented in vfs_aio.c. How its > sysctls get CTLFLAG_DYN? > Bugger. Turns out indeed one can sysctl_register_oid and then it does not have the flag. What's more, one can unregister it in similar way which completely ignores oid_running anyway. As such, yes, there is a bug but my changes don't affect it. Maybe I'll try to fix it later with a proven hack (a macro which expands to 0 at kernel compile time and to _DYN during module build). -- Mateusz Guzik <mjguzik gmail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141230224148.GB27329>