logger: safeguard endio() calling conventions

This commit is contained in:
Thomas Schoebel-Theuer 2015-04-27 08:59:43 +02:00
parent 18f1ae84f3
commit 7cbb705882
2 changed files with 10 additions and 0 deletions

View File

@ -1540,6 +1540,15 @@ void phase0_endio(void *private, int error)
orig_mref_a = private;
CHECK_PTR(orig_mref_a, err);
// remove_this
if (unlikely(cmpxchg(&orig_mref_a->is_endio, false, true))) {
MARS_ERR("Sigh this should not happen %p %p\n",
orig_mref_a, orig_mref_a->object);
return;
}
// end_remove_this
brick = orig_mref_a->my_brick;
CHECK_PTR(brick, err);
orig_mref = orig_mref_a->object;

View File

@ -145,6 +145,7 @@ struct trans_logger_mref_aspect {
bool is_collected;
bool is_fired;
bool is_completed;
bool is_endio;
bool is_persistent;
bool is_emergency;
struct timespec stamp;