mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
share_mode_lock: DEBUG/ASSERT recursion deadlock detection
This situation should never happen! The known trigger is fixed with the change to adouble_open_rsrc_fsp() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
1052314dcd
commit
db743ab005
@ -880,8 +880,15 @@ struct share_mode_lock *get_share_mode_lock(
|
||||
|
||||
if (static_share_mode_data != NULL) {
|
||||
if (!file_id_equal(&static_share_mode_data->id, &id)) {
|
||||
DEBUG(1, ("Can not lock two share modes "
|
||||
"simultaneously\n"));
|
||||
struct file_id_buf existing;
|
||||
struct file_id_buf requested;
|
||||
|
||||
DBG_ERR("Can not lock two share modes "
|
||||
"simultaneously: existing %s requested %s\n",
|
||||
file_id_str_buf(static_share_mode_data->id, &existing),
|
||||
file_id_str_buf(id, &requested));
|
||||
|
||||
smb_panic(__location__);
|
||||
goto fail;
|
||||
}
|
||||
goto done;
|
||||
@ -904,6 +911,7 @@ struct share_mode_lock *get_share_mode_lock(
|
||||
cmp = tdb_data_cmp(share_mode_lock_key, key);
|
||||
if (cmp != 0) {
|
||||
DBG_WARNING("Can not lock two share modes simultaneously\n");
|
||||
smb_panic(__location__);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -929,6 +937,15 @@ done:
|
||||
|
||||
talloc_set_destructor(lck, share_mode_lock_destructor);
|
||||
|
||||
if (CHECK_DEBUGLVL(DBGLVL_DEBUG)) {
|
||||
struct file_id_buf returned;
|
||||
|
||||
DBG_DEBUG("Returning %s (data_refcount=%zu key_refcount=%zu)\n",
|
||||
file_id_str_buf(id, &returned),
|
||||
static_share_mode_data_refcount,
|
||||
share_mode_lock_key_refcount);
|
||||
}
|
||||
|
||||
return lck;
|
||||
fail:
|
||||
TALLOC_FREE(lck);
|
||||
|
Loading…
x
Reference in New Issue
Block a user