[PATCH] Make loadparm more common

Richard Sharpe realrichardsharpe at gmail.com
Thu Apr 3 22:04:07 MDT 2014


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?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list