Browse Source

Workaround: Debug log only after dec_queued, to make a free/use race more rare

Luke Dashjr 13 years ago
parent
commit
68499a3880
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cgminer.c

+ 2 - 2
cgminer.c

@@ -2398,8 +2398,8 @@ static void *get_work_thread(void *userdata)
 	pool = wc->pool;
 
 	if (clone_available()) {
-		applog(LOG_DEBUG, "dec_queued from get_work_thread due to clone available");
 		dec_queued(pool);
+		applog(LOG_DEBUG, "dec_queued from get_work_thread due to clone available");
 		goto out;
 	}
 
@@ -2915,8 +2915,8 @@ static bool hash_push(struct work *work)
 
 	if (work->queued) {
 		work->queued = false;
-		applog(LOG_DEBUG, "dec_queued in hash_push");
 		dec_queued(work->pool);
+		applog(LOG_DEBUG, "dec_queued from hash_push");
 	}
 
 	return rc;