[PATCH] Remove all uses of talloc_autofree_context() from our code (except for test)
jra at samba.org
Tue Jul 25 20:28:01 UTC 2017
On Wed, Jul 26, 2017 at 08:13:59AM +1200, Andrew Bartlett wrote:
> On Tue, 2017-07-25 at 13:04 -0700, Jeremy Allison via samba-technical
> > On Tue, Jul 25, 2017 at 09:58:06PM +0200, Volker Lendecke wrote:
> > > On Tue, Jul 25, 2017 at 12:37:24PM -0700, Jeremy Allison wrote:
> > > > > Does "smbcontrol smbd pool-usage" still work after this change?
> > > >
> > > > No. If we're not using the global null_context within
> > > > talloc anymore, then pool usage doesn't have a central
> > > > place to track all allocations off it.
> > >
> > > That's tough. I definitely want pool-usage to be available everywhere
> > > and always. When you need it, it's too late to activate it.
> > Having it available "everywhere and always" is inconsistent
> > with the design criteria behind this patchset. For that you
> > need a completely MT-safe talloc - you know it and I know it :-).
> > If you'd have mentioned that in the beginning then I wouldn't
> > have spent literally *months* of work getting this done and
> > cleaning up the code to this state.
> It wasn't ever mentioned as a required casualty Jermey, Sorry.
> I always assumed this work was about libsmbclient etc, making our
> libraries not suck when used MT.
As pointed out by Volker on the phone, I'm conflating two issues here :-).
Using talloc_autofree_context() has been the cause of some
mightily lazy shitty API design issues, so let's get rid of
Making talloc fully MT-safe is a larger issue, and removing
the talloc_enable_null_tracking() call is part of that,
and not the design issue problem.
So I've asked him to review (and possibly ACK) the
first 14 patches, and NAK the last one that removes
That way I get talloc_autofree_context() removed from
our code and hopefully will prevent anyone from
re-adding it, but you all still get "smbcontrol smbd pool-usage"
Does that sound like a plan ?
I hate you all equally (but at least I haven't wasted several
months worth of work :-) :-) :-).
More information about the samba-technical