[PATCH] Patchset for bug #10344 - SessionLogoff on a signed connection with an outstanding notify request crashes smbd.

Jeremy Allison jra at samba.org
Wed Mar 5 09:40:34 MST 2014

On Wed, Mar 05, 2014 at 03:05:09PM +0100, Stefan (metze) Metzmacher wrote:
> Hi Jeremy,
> >> I really hate this patches, but I don't have something better currently :-)
> > 
> > Why thank you :-).
> The re-entrant thing totally destroys the simplicity of tevent_req based
> programming, where you always now who the caller is. But this
> jumps from deep down the stack recursively back into the caller
> and re-schedules itself. The fact that this is a implicit deferred
> recursion makes it even worse.
> This is currently needed in order to call become_user(),
> but it's very very hard to understand. The complexity isn't better
> than nested event loops...
> Once I've finished my
> https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master3-impersonate
> branch, we'll have wrapper tevent contexts, which will take care of
> become_user(),
> for the event handler.

I'll take a look at that.

> Then we can get rid of the re-entrant hell again.

I've come to the conclusion that what my patch
really needs is a way for a replying SMB2 request
to wake up an arbitrary number of suspended SMB2
requests that depend upon it.

Volker's tevent wait mechanism is the ideal solution :-).

I actually have quite a simple patch that implements
this, and I'm re-structuring my patch on top of
it. Suspending yourself and waking up then become
like pthread mutexes, where you check the condition
that awoke you and if not completely satified just
re-suspend yourself.

Should get this finished sometime this week and
I'll send another version of this patch for


More information about the samba-technical mailing list