Exiting a worker my race with cancelling that same worker. This caused a
segmenation fault.
Reported and tested by Anatol Pomozov
+2013-03-19 Miklos Szeredi <miklos@szeredi.hu>
+
+ * libfuse: fix thread cancel race. Exiting a worker my race with
+ cancelling that same worker. This caused a segmenation
+ fault. Reported and tested by Anatol Pomozov
+
2013-02-04 Miklos Szeredi <miklos@szeredi.hu>
* libfuse: fix crash in unlock_path(). Patch by Ratna Manoj
while (!fuse_session_exited(se))
sem_wait(&mt.finish);
+ pthread_mutex_lock(&mt.lock);
for (w = mt.main.next; w != &mt.main; w = w->next)
pthread_cancel(w->thread_id);
mt.exit = 1;
+ pthread_mutex_unlock(&mt.lock);
while (mt.main.next != &mt.main)
fuse_join_worker(&mt, mt.main.next);