Thomas Betker
157078f64b
Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin"
...
This reverts commit 5ffd3412ae55
("jffs2: Fix lock acquisition order bug in jffs2_write_begin").
The commit modified jffs2_write_begin() to remove a deadlock with
jffs2_garbage_collect_live(), but this introduced new deadlocks found
by multiple users. page_lock() actually has to be called before
mutex_lock(&c->alloc_sem) or mutex_lock(&f->sem) because
jffs2_write_end() and jffs2_readpage() are called with the page locked,
and they acquire c->alloc_sem and f->sem, resp.
In other words, the lock order in jffs2_write_begin() was correct, and
it is the jffs2_garbage_collect_live() path that has to be changed.
Revert the commit to get rid of the new deadlocks, and to clear the way
for a better fix of the original deadlock.
Reported-by: Deng Chao <deng.chao1@zte.com.cn>
Reported-by: Ming Liu <liu.ming50@gmail.com>
Reported-by: wangzaiwei <wangzaiwei@top-vision.cn>
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@vger.kernel.org
2016-02-25 11:11:25 +00:00
..
2016-01-22 18:04:28 -05:00
2016-01-20 17:09:18 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2015-12-30 13:01:03 -05:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-24 12:34:13 -08:00
2016-01-24 12:31:12 -08:00
2016-01-23 12:24:56 -08:00
2016-01-22 18:04:28 -05:00
2015-12-08 22:41:36 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-21 17:45:15 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-23 12:24:56 -08:00
2016-01-23 12:24:56 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2015-12-08 22:41:36 -05:00
2015-11-11 02:11:02 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-06 13:03:18 -05:00
2016-02-25 11:11:25 +00:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-07 10:10:50 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-23 12:24:56 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2015-12-08 22:41:36 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2015-11-13 21:53:18 -08:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-23 12:24:56 -08:00
2016-01-14 16:00:49 -08:00
2016-01-23 12:24:56 -08:00
2016-01-22 18:04:28 -05:00
2015-12-06 21:17:14 -05:00
2015-11-10 12:07:22 -08:00
2016-01-20 00:39:20 +01:00
2016-01-22 18:04:28 -05:00
2016-01-23 12:24:56 -08:00
2016-01-06 13:03:18 -05:00
2016-01-12 17:11:47 -08:00
2016-01-04 10:28:32 -05:00
2016-01-20 17:09:18 -08:00
2016-01-23 12:24:56 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2015-12-08 14:52:03 +01:00
2016-01-20 17:09:18 -08:00
2016-01-22 18:04:28 -05:00
2016-01-09 02:55:37 -05:00
2016-01-14 16:00:49 -08:00
2016-01-19 12:02:23 -05:00
2016-01-15 17:56:32 -08:00
2016-01-23 12:24:56 -08:00
2016-01-08 21:20:11 -05:00
2016-01-22 18:04:28 -05:00
2016-01-15 17:56:32 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2015-11-06 17:50:42 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-19 19:25:21 -05:00
2015-12-13 19:46:12 -05:00
2015-12-06 21:17:16 -05:00
2016-01-22 20:29:55 -05:00
2016-01-22 18:04:28 -05:00
2016-01-06 08:26:52 -05:00
2015-11-06 17:50:42 -08:00
2016-01-09 02:55:35 -05:00
2016-01-16 11:17:23 -08:00
2016-01-14 17:04:19 -08:00
2015-11-06 17:50:42 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00