Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
slapd: avoid tsan-traps in backover.
Browse files Browse the repository at this point in the history
Change-Id: I979d09579f4232b7da74acc6c4ace63ff2a39340
  • Loading branch information
erthink committed Dec 14, 2015
1 parent 5108f0e commit 532929a
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions servers/slapd/backover.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,11 @@ over_access_allowed(
rc = 0;
}

if ( be->bd_info != bi ) {
assert(SLAP_ISOVERLAY( be ));
be->bd_info = bi;
}
op->o_bd = be;
op->o_bd->bd_info = bi;

return rc;
}
Expand Down Expand Up @@ -370,8 +373,11 @@ overlay_entry_get_ov(
rc = LDAP_UNWILLING_TO_PERFORM;
}

if ( be->bd_info != bi ) {
assert(SLAP_ISOVERLAY( be ));
be->bd_info = bi;
}
op->o_bd = be;
op->o_bd->bd_info = bi;

return rc;
}
Expand Down Expand Up @@ -440,8 +446,11 @@ overlay_entry_release_ov(
rc = 0;
}

if ( be->bd_info != bi ) {
assert(SLAP_ISOVERLAY( be ));
be->bd_info = bi;
}
op->o_bd = be;
op->o_bd->bd_info = bi;

return rc;
}
Expand Down Expand Up @@ -526,8 +535,11 @@ over_acl_group(
rc = 0;
}

if ( be->bd_info != bi ) {
assert(SLAP_ISOVERLAY( be ));
be->bd_info = bi;
}
op->o_bd = be;
op->o_bd->bd_info = bi;

return rc;
}
Expand Down Expand Up @@ -595,8 +607,11 @@ over_acl_attribute(
rc = 0;
}

if ( be->bd_info != bi ) {
assert(SLAP_ISOVERLAY( be ));
be->bd_info = bi;
}
op->o_bd = be;
op->o_bd->bd_info = bi;

return rc;
}
Expand Down Expand Up @@ -708,6 +723,7 @@ over_op_func(
slap_overinfo *oi;
slap_overinst *on;
BackendDB *be = op->o_bd, db;
BackendInfo *bi = be->bd_info;
slap_callback cb = {NULL, over_back_response, NULL, NULL}, **sc;
int rc = SLAP_CB_CONTINUE;

Expand Down Expand Up @@ -735,7 +751,12 @@ over_op_func(
}
}

if ( be->bd_info != bi ) {
assert(SLAP_ISOVERLAY( be ));
be->bd_info = bi;
}
op->o_bd = be;

return rc;
}

Expand Down

0 comments on commit 532929a

Please sign in to comment.