[PATCH] Make loadparm more common

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Apr 2 01:04:52 MDT 2014


On Wed, Apr 02, 2014 at 08:00:03PM +1300, Andrew Bartlett wrote:
> On Wed, 2014-04-02 at 07:03 +0200, Volker Lendecke wrote:
> > On Wed, Apr 02, 2014 at 11:43:13AM +1300, Andrew Bartlett wrote:
> > > On Tue, 2014-04-01 at 08:43 +0200, Volker Lendecke wrote:
> > > > On Tue, Apr 01, 2014 at 05:21:02PM +1300, Andrew Bartlett wrote:
> > > > > At this point, what I would like to see is these patches reviewed:
> > > > > http://git.catalyst.net.nz/gitweb?p=samba.git;a=commitdiff;h=5fa1a3cd62e0dcefc5364f83046db025fc0e65b9
> > > > 
> > > > This has a talloc_zero(NULL,...). Would it be possible to
> > > > use talloc_tos() here?
> > > 
> > > 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().  
> > 
> > talloc_tos() should not fail if there is no stackframe
> > around. It should just print a warning. Can you explain in
> > more detail how this fails?
> 
> TALLOC_CTX *_talloc_tos(const char *location)
> {
> 	struct talloc_stackframe *ts =
> 		(struct talloc_stackframe *)SMB_THREAD_GET_TLS(global_ts);
> 
> 	if (ts == NULL || ts->talloc_stacksize == 0) {
> 		_talloc_stackframe(location);
> 		ts = (struct talloc_stackframe *)SMB_THREAD_GET_TLS(global_ts);
> 		DEBUG(0, ("no talloc stackframe at %s, leaking memory\n",
> 			  location));
> #ifdef DEVELOPER
> 		smb_panic("No talloc stackframe");
> #endif
> 	}
> 
> 	return ts->talloc_stack[ts->talloc_stacksize-1];
> }

This is DEVELOPER only, and it was not there initially. We
need to fix the places where it is not around then. I'd
rather remove that panic again.

> This is not new code.  This is a long-over due attempt to make a small

It is. It is + in the diff, so by my definition this is a
new code line. I'm not sure about your definition of new
code, but a + in a patch to me makes it fresh.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list