diff options
author | 2013-02-04 18:30:14 +0100 | |
---|---|---|
committer | 2013-02-04 18:30:14 +0100 | |
commit | 3a2bd4da6b0b713276528d0c818f9e7be515e8ec (patch) | |
tree | d09bfa03060438a1797540c19dd4e7f3113bb3ac /lib/fuse.c | |
parent | ad38195a88c80d73cb46507851ebb870f3bd588d (diff) |
libfuse: fix crash in unlock_path()
Patch by Ratna Manoj.
queue_element_unlock() should set ->first_locked and ->second_locked to false.
Discovered with 'fs_racer'. The assert(wnode->treelock == TREELOCK_WRITE) in
unlock_path() was hit within minutes.
Miklos: simplified patch
Diffstat (limited to 'lib/fuse.c')
-rw-r--r-- | lib/fuse.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1021,10 +1021,12 @@ static void queue_element_unlock(struct fuse *f, struct lock_queue_element *qe) if (qe->first_locked) { wnode = qe->wnode1 ? *qe->wnode1 : NULL; unlock_path(f, qe->nodeid1, wnode, NULL); + qe->first_locked = false; } if (qe->second_locked) { wnode = qe->wnode2 ? *qe->wnode2 : NULL; unlock_path(f, qe->nodeid2, wnode, NULL); + qe->second_locked = false; } } |