[PATCH] Make loadparm more common
Jeremy Allison
jra at samba.org
Fri Apr 4 09:41:04 MDT 2014
On Thu, Apr 03, 2014 at 09:04:07PM -0700, Richard Sharpe wrote:
> On Thu, Apr 3, 2014 at 9:34 AM, Jeremy Allison <jra at samba.org> wrote:
> > On Thu, Apr 03, 2014 at 01:45:47PM +0200, David Disseldorp wrote:
> >> On Wed, 2 Apr 2014 10:18:10 +0200, Michael Adam wrote:
> >>
> >> > > > No, I'm not willing to add any more talloc_tos() to this area of the
> >> > > > code. Almost all the odd unexpected failures caused by this patch set
> >> > > > were due to new talloc_tos() calls, because not all callers had a
> >> > > > talloc_stackframe().
> >> >
> >> > Well, those is a bug then, and the developer mode to panic
> >> > in that case was introduced so that we can fix the callers up.
> >> >
> >> > I think adding talloc_tos() is way better than adding talloc(NULL,...)
> >> > since this way we can at least easily spot the leaks.
> >>
> >> I disagree. IMO tallocations on the null context are much more readable
> >> and debugable. For talloc_tos() tallocations one needs to consider
> >> whether a stackframe is around, and when the next garbage collection
> >> could take place.
> >
> > NULL talloc context allocations are utterly thread-unsafe,
> > that's my problem with them.
> >
> > Now I know we don't do much with threads, but we do need
> > to get there eventually.. :-).
>
> Pardon my ignorance, but why are they thread unsafe?
If you have NULL tracking on (which is a good idea
to ensure talloc_poolmem reporting doesn't miss
anything) then adding anything to a NULL talloc
modifies a global variable.
More information about the samba-technical
mailing list