IT seems that by signalling the completion of a thread before
we are done inspecting it's memory is racy and could cause access
to freed memory.
Change-Id: Ia992e9c7d0d78fca1afbfc98f51c5df3f6dc3a28
Signed-off-by: Oleg Drokin <green@intel.com>
Reviewed-on: http://review.whamcloud.com/6329
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
if (rc)
CERROR("can't cleanup llog: %d\n", rc);
out:
- thread->t_flags = SVC_STOPPED;
-
- cfs_waitq_signal(&thread->t_ctl_waitq);
LASSERTF(d->opd_syn_rpc_in_progress == 0,
"%s: %d %d %sempty\n",
d->opd_obd->obd_name, d->opd_syn_rpc_in_progress,
d->opd_syn_rpc_in_flight,
cfs_list_empty(&d->opd_syn_committed_there) ? "" : "!");
+ thread->t_flags = SVC_STOPPED;
+
+ cfs_waitq_signal(&thread->t_ctl_waitq);
+
lu_env_fini(&env);
RETURN(0);