From bf0a27edecdfb366217b2e87cb842e598b3ec413 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 22 Sep 2010 05:23:43 -0700 Subject: [PATCH] s3: Fix a deadlock between notify_onelevel.tdb and notify.tdb notify_add() locks notify_onlevel.tdb while having notify.tdb locked. file_free() calls notify_remove_onelevel(), and due to this talloc hierarchy problem the tdb record is not unlocked again timely. Thus notify.tdb will be locked while notify_onelevel still has a lock. Sorry, Ronnie, for causing you some grey hair and thanks for the stacktraces. Volker --- source3/smbd/notify_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 243335c9fc..c8f8616d8b 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -599,7 +599,7 @@ NTSTATUS notify_remove_onelevel(struct notify_context *notify, } rec = notify->db_onelevel->fetch_locked( - notify->db_onelevel, talloc_tos(), + notify->db_onelevel, array, make_tdb_data((uint8_t *)fid, sizeof(*fid))); if (rec == NULL) { DEBUG(10, ("notify_remove_onelevel: fetch_locked for %s failed" -- 2.34.1