[PATCH] Improve code in ctdb lock helper

Volker Lendecke vl at samba.org
Thu Dec 1 09:47:06 UTC 2016


On Thu, Dec 01, 2016 at 03:33:09PM +1100, Amitay Isaacs wrote:
> Hi,
> 
> Here are two patches that do the following:
> 
> 1. Drop the support for locking multiple databases since it's not required
> any more.
> 2. Add explicit unlocking of record/db when lock helper is exiting

Are we sure that we only ever call async signal safe functions in the
tdb functions? For example I'm pretty certain that tdb_close calls
free(), which is not async signal safe. What happens for example if
the signal comes before we expect it, and we are in a malloc call?
This would block the child forever.

Can we change this to not call tdb functions directly in the signal
handler but set a global variable, expecting EINTR at all relevant
points?

Volker



More information about the samba-technical mailing list