diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2016-02-01 07:37:20 -0500 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2016-02-25 06:11:26 -0500 |
| commit | 49e91e7079febe59a20ca885a87dd1c54240d0f1 (patch) | |
| tree | 492560579a27a7658d2327f0e0a3a6eb825a303f /fs/jffs2/README.Locking | |
| parent | 157078f64b8a9cd7011b6b900b2f2498df850748 (diff) | |
jffs2: Fix page lock / f->sem deadlock
With this fix, all code paths should now be obtaining the page lock before
f->sem.
Reported-by: Szabó Tamás <sztomi89@gmail.com>
Tested-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/jffs2/README.Locking')
| -rw-r--r-- | fs/jffs2/README.Locking | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/jffs2/README.Locking b/fs/jffs2/README.Locking index 3ea36554107f..8918ac905a3b 100644 --- a/fs/jffs2/README.Locking +++ b/fs/jffs2/README.Locking | |||
| @@ -2,10 +2,6 @@ | |||
| 2 | JFFS2 LOCKING DOCUMENTATION | 2 | JFFS2 LOCKING DOCUMENTATION |
| 3 | --------------------------- | 3 | --------------------------- |
| 4 | 4 | ||
| 5 | At least theoretically, JFFS2 does not require the Big Kernel Lock | ||
| 6 | (BKL), which was always helpfully obtained for it by Linux 2.4 VFS | ||
| 7 | code. It has its own locking, as described below. | ||
| 8 | |||
| 9 | This document attempts to describe the existing locking rules for | 5 | This document attempts to describe the existing locking rules for |
| 10 | JFFS2. It is not expected to remain perfectly up to date, but ought to | 6 | JFFS2. It is not expected to remain perfectly up to date, but ought to |
| 11 | be fairly close. | 7 | be fairly close. |
| @@ -69,6 +65,7 @@ Ordering constraints: | |||
| 69 | any f->sem held. | 65 | any f->sem held. |
| 70 | 2. Never attempt to lock two file mutexes in one thread. | 66 | 2. Never attempt to lock two file mutexes in one thread. |
| 71 | No ordering rules have been made for doing so. | 67 | No ordering rules have been made for doing so. |
| 68 | 3. Never lock a page cache page with f->sem held. | ||
| 72 | 69 | ||
| 73 | 70 | ||
| 74 | erase_completion_lock spinlock | 71 | erase_completion_lock spinlock |
