Revision: 2297
Author:
regra...@gmail.com
Date: Tue Mar 10 17:41:54 2015 UTC
Log: Fixes a problem with ME triggered appends when using CTset and a
previously unused ME/CT combination as reported by Salvatore Di Girolamo.
https://code.google.com/p/portals4/source/detail?r=2297
Modified:
/trunk/src/ib/ptl_ct.c
/trunk/src/ib/ptl_me.c
=======================================
--- /trunk/src/ib/ptl_ct.c Fri Nov 7 16:57:12 2014 UTC
+++ /trunk/src/ib/ptl_ct.c Tue Mar 10 17:41:54 2015 UTC
@@ -537,7 +537,7 @@
PTL_FASTLOCK_UNLOCK(&ct->lock);
- do_trig_me_op(buf);
+ do_trig_me_op(buf, ct);
PTL_FASTLOCK_LOCK(&ct->lock);
} else {
=======================================
--- /trunk/src/ib/ptl_me.c Wed Oct 2 21:26:45 2013 UTC
+++ /trunk/src/ib/ptl_me.c Tue Mar 10 17:41:54 2015 UTC
@@ -9,7 +9,7 @@
#ifdef WITH_TRIG_ME_OPS
static void post_trig_me(buf_t *buf, ct_t *me_ct);
-void do_trig_me_op(buf_t *buf);
+void do_trig_me_op(buf_t *buf, ct_t *ct);
#endif
/**
@@ -508,13 +508,14 @@
*
* @param[in] buf
*/
-void do_trig_me_op(buf_t *buf)
+void do_trig_me_op(buf_t *buf, ct_t *ct)
{
- ct_t *ct = buf->ct;
- /* we're a zombie */
- if (ct->info.interrupt)
+ /* if we're a zombie */
+ if (ct->info.interrupt) {
+ ptl_info("this CT is being shut down, don't trigger anything on
it\n");
goto done;
+ }
ptl_info("type of triggered me op is: %i \n", buf->me_op);
@@ -551,7 +552,7 @@
buf->threshold) {
PTL_FASTLOCK_UNLOCK(&me_ct->lock);
- do_trig_me_op(buf);
+ do_trig_me_op(buf,me_ct);
} else {
atomic_inc(&me_ct->list_size);