TDB mutex support breaks CTDB

Stefan (metze) Metzmacher metze at
Wed Dec 17 11:14:38 MST 2014

Hi Jeremy,

> LGTM. Pushed.

Please repush with the following commit message,
there was a non-public commit mentioned, sorry.

> Is there any comment showing a cluster config can call
> this will an uninitialized entry ? It seems rather unusual..

With CTDB deleted record appear as empty record until they are cleaned
up later.

Also in the non cluster case some fields would be uninitialized.

-------------- next part --------------
From 899ce1791bd9bbf85f1d227ac59c8f52814d8299 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at>
Date: Wed, 17 Dec 2014 10:43:33 +0100
Subject: [PATCH] s3:locking: fix uninitialiazed variable in

In a cluster this can be called with an empty record, while
brl_parse_data() relies on an initialized structure.

This is a regression in commit 837e29035c911f3509135252c3f423d0f56b606d.


Signed-off-by: Stefan Metzmacher <metze at>
Reviewed-by: Ralph Boehme <slow at>
 source3/locking/brlock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 6c73c72..7fd3783 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -2014,6 +2014,7 @@ static void brl_get_locks_readonly_parser(TDB_DATA key, TDB_DATA data,
 		*state->br_lock = NULL;
+	*br_lck = (struct byte_range_lock) {};
 	if (!brl_parse_data(br_lck, data)) {
 		*state->br_lock = NULL;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the samba-technical mailing list