[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1034-g786447d

simo idra at samba.org
Tue Apr 14 17:45:37 GMT 2009


On Tue, 2009-04-14 at 09:24 -0700, Jeremy Allison wrote:
> On Tue, Apr 14, 2009 at 03:55:13PM +1000, Andrew Bartlett wrote:
> > On Tue, 2009-04-14 at 07:49 +0200, Volker Lendecke wrote:
> > > On Mon, Apr 13, 2009 at 11:05:16PM -0500, Andrew Bartlett wrote:
> > > > -	if (!push_ucs2_allocate(&buffer, src, &size)) {
> > > > +	if (!push_ucs2_talloc(NULL, &buffer, src, &size)) {
> > > 
> > > Any reason why you don't use talloc_tos() in your patches?
> > > Is there any flaw with talloc_stack.c that I should know
> > > about?
> > 
> > I did, in most of the places where it seemed reasonable (such as was
> > indicated by similar use in that context).  The rest I just did the most
> > simple replacement possible, to avoid introducing inadvertent errors.
> 
> Please go back and replace the _talloc(NULL,...) allocations
> with talloc_tos(). The problem is _talloc(NULL,...) cannot
> be thread safe, whereas talloc_tos() will be.

Uhmm why talloc(NULL, can't be thread safe ?
It is generating a new context from scratch so why would it be
problematic?

Note: I am not advocating to not use talloc_tos(), just wondering why a
NULL context would make it not thread safe.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list