1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

fixed a potential locking deadlock in tdb

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent a08b08f778
commit 03453e2ae5

View File

@ -761,7 +761,7 @@ int tdb_traverse(TDB_CONTEXT *tdb, int (*fn)(TDB_CONTEXT *tdb, TDB_DATA key, TDB
/* loop over all hash chains */
for (h = 0; h < tdb->header.hash_size; h++) {
tdb_lock(tdb, BUCKET(h), F_RDLCK);
tdb_lock(tdb, BUCKET(h), F_WRLCK);
/* read in the hash top */
offset = tdb_hash_top(tdb, h);