|
|
6f99e3 |
From 3a2bd4da6b0b713276528d0c818f9e7be515e8ec Mon Sep 17 00:00:00 2001
|
|
|
6f99e3 |
From: "Ratna_Bolla@dell.com" <Ratna_Bolla@dell.com>
|
|
|
6f99e3 |
Date: Mon, 4 Feb 2013 18:30:14 +0100
|
|
|
6f99e3 |
Subject: [PATCH] libfuse: fix crash in unlock_path()
|
|
|
6f99e3 |
|
|
|
6f99e3 |
Patch by Ratna Manoj.
|
|
|
6f99e3 |
|
|
|
6f99e3 |
queue_element_unlock() should set ->first_locked and ->second_locked to false.
|
|
|
6f99e3 |
|
|
|
6f99e3 |
Discovered with 'fs_racer'. The assert(wnode->treelock == TREELOCK_WRITE) in
|
|
|
6f99e3 |
unlock_path() was hit within minutes.
|
|
|
6f99e3 |
|
|
|
6f99e3 |
Miklos: simplified patch
|
|
|
6f99e3 |
---
|
|
|
6f99e3 |
ChangeLog | 4 ++++
|
|
|
6f99e3 |
lib/fuse.c | 2 ++
|
|
|
6f99e3 |
2 files changed, 6 insertions(+)
|
|
|
6f99e3 |
|
|
|
6f99e3 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
6f99e3 |
index dbd10e85ebf8..076bcaf54490 100644
|
|
|
6f99e3 |
--- a/ChangeLog
|
|
|
6f99e3 |
+++ b/ChangeLog
|
|
|
6f99e3 |
@@ -1,3 +1,7 @@
|
|
|
6f99e3 |
+2013-02-04 Miklos Szeredi <miklos@szeredi.hu>
|
|
|
6f99e3 |
+
|
|
|
6f99e3 |
+ * libfuse: fix crash in unlock_path(). Patch by Ratna Manoj
|
|
|
6f99e3 |
+
|
|
|
6f99e3 |
2012-10-01 Miklos Szeredi <miklos@szeredi.hu>
|
|
|
6f99e3 |
|
|
|
6f99e3 |
* Released 2.9.2
|
|
|
6f99e3 |
diff --git a/lib/fuse.c b/lib/fuse.c
|
|
|
6f99e3 |
index 599a587fbe60..1917346c759d 100644
|
|
|
6f99e3 |
--- a/lib/fuse.c
|
|
|
6f99e3 |
+++ b/lib/fuse.c
|
|
|
6f99e3 |
@@ -1021,10 +1021,12 @@ static void queue_element_unlock(struct fuse *f, struct lock_queue_element *qe)
|
|
|
6f99e3 |
if (qe->first_locked) {
|
|
|
6f99e3 |
wnode = qe->wnode1 ? *qe->wnode1 : NULL;
|
|
|
6f99e3 |
unlock_path(f, qe->nodeid1, wnode, NULL);
|
|
|
6f99e3 |
+ qe->first_locked = false;
|
|
|
6f99e3 |
}
|
|
|
6f99e3 |
if (qe->second_locked) {
|
|
|
6f99e3 |
wnode = qe->wnode2 ? *qe->wnode2 : NULL;
|
|
|
6f99e3 |
unlock_path(f, qe->nodeid2, wnode, NULL);
|
|
|
6f99e3 |
+ qe->second_locked = false;
|
|
|
6f99e3 |
}
|
|
|
6f99e3 |
}
|
|
|
6f99e3 |
|
|
|
6f99e3 |
--
|
|
|
6f99e3 |
2.14.3
|
|
|
6f99e3 |
|