diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/fuse.c | 1 | ||||
-rw-r--r-- | lib/fuse_loop_mt.c | 2 |
3 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,9 @@ +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-20 Miklos Szeredi <miklos@szeredi.hu> * libfuse: change the type of fuse_ino_t from 'unsigned long' to @@ -4180,6 +4180,7 @@ static void fuse_lib_help(void) " -o ac_attr_timeout=T auto cache timeout for attributes (attr_timeout)\n" " -o noforget never forget cached inodes\n" " -o remember=T remember cached inodes for T seconds (0s)\n" +" -o nopath don't supply path if not necessary\n" " -o intr allow requests to be interrupted\n" " -o intr_signal=NUM signal to send on interrupt (%i)\n" " -o modules=M1[:M2...] names of modules to push onto filesystem stack\n" diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index 7ae5890..82e3001 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -241,9 +241,11 @@ int fuse_session_loop_mt(struct fuse_session *se) 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); |