Jan Kara
b4644ca460
ext2: Fix fs corruption in ext2_get_xip_mem()
...
commit 7ba3ec5749 upstream.
Commit 8e3dffc651 "Ext2: mark inode dirty after the function
dquot_free_block_nodirty is called" unveiled a bug in __ext2_get_block()
called from ext2_get_xip_mem(). That function called ext2_get_block()
mistakenly asking it to map 0 blocks while 1 was intended. Before the
above mentioned commit things worked out fine by luck but after that commit
we started returning that we allocated 0 blocks while we in fact
allocated 1 block and thus allocation was looping until all blocks in
the filesystem were exhausted.
Fix the problem by properly asking for one block and also add assertion
in ext2_get_blocks() to catch similar problems.
Reported-and-tested-by: Andiry Xu <andiry.xu@gmail.com >
Signed-off-by: Jan Kara <jack@suse.cz >
Cc: Wang Nan <wangnan0@huawei.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-10-05 14:54:15 -07:00
..
2013-05-07 20:16:25 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2013-05-07 20:16:25 -07:00
2013-05-06 13:06:59 -07:00
2013-05-31 15:17:56 -04:00
2013-03-03 19:36:31 -08:00
2014-09-05 16:28:36 -07:00
2013-04-09 14:12:56 -04:00
2014-01-09 12:24:25 -08:00
2014-10-05 14:54:11 -07:00
2013-04-09 14:12:56 -04:00
2013-11-29 11:11:53 -08:00
2013-03-03 19:36:31 -08:00
2013-08-14 22:59:10 -07:00
2013-12-04 10:55:49 -08:00
2013-05-01 14:08:52 -07:00
2013-11-13 12:05:31 +09:00
2013-05-13 20:12:10 +01:00
2013-03-03 19:36:31 -08:00
2014-02-13 13:48:00 -08:00
2013-02-27 19:10:24 -08:00
2014-10-05 14:54:15 -07:00
2013-07-21 18:21:23 -07:00
2014-09-05 16:28:36 -07:00
2013-05-08 15:11:48 -07:00
2013-05-24 16:22:50 -07:00
2013-03-12 18:55:21 -07:00
2013-04-29 15:54:27 -07:00
2014-07-28 08:00:02 -07:00
2014-01-25 08:27:11 -08:00
2013-05-24 16:22:51 -07:00
2013-05-07 20:16:25 -07:00
2013-05-04 15:48:45 -04:00
2013-07-13 11:42:26 -07:00
2013-04-29 15:41:42 -04:00
2013-10-18 07:45:45 -07:00
2014-09-05 16:28:34 -07:00
2013-05-03 09:56:25 -07:00
2014-09-05 16:28:36 -07:00
2014-04-26 17:15:36 -07:00
2013-11-13 12:05:31 +09:00
2014-10-05 14:54:13 -07:00
2013-03-23 14:15:31 -07:00
2013-03-03 19:36:31 -08:00
2013-06-07 12:15:38 -04:00
2014-10-05 14:54:10 -07:00
2013-02-13 06:15:14 -08:00
2014-09-05 16:28:37 -07:00
2014-10-05 14:54:14 -07:00
2014-10-05 14:54:13 -07:00
2013-05-07 20:16:25 -07:00
2014-10-05 14:54:14 -07:00
2013-03-03 19:36:31 -08:00
2013-03-03 19:36:31 -08:00
2014-09-17 09:03:57 -07:00
2013-05-09 16:42:10 -07:00
2013-03-03 19:36:31 -08:00
2013-05-31 15:17:31 -04:00
2014-03-06 21:30:12 -08:00
2013-02-26 20:16:07 -08:00
2014-07-06 18:54:15 -07:00
2013-04-29 09:17:57 +10:00
2013-03-11 07:09:48 -07:00
2013-04-05 15:35:52 -07:00
2013-10-05 07:13:09 -07:00
2014-07-06 18:54:13 -07:00
2013-10-01 09:17:48 -07:00
2013-04-30 09:36:50 -07:00
2014-09-17 09:04:01 -07:00
2014-06-30 20:09:45 -07:00
2013-02-26 02:46:11 -05:00
2014-06-16 13:42:52 -07:00
2012-12-17 17:15:12 -08:00
2013-05-01 17:51:54 -07:00
2013-05-02 10:16:16 -07:00
2013-10-13 16:08:31 -07:00
2012-12-17 17:15:23 -08:00
2013-04-29 15:40:23 -04:00
2013-04-30 17:04:03 -07:00
2012-12-20 17:40:19 -08:00
2012-11-28 21:53:38 -05:00
2014-03-23 21:38:21 -07:00
2013-10-05 07:13:09 -07:00
2013-07-28 16:29:40 -07:00
2014-10-05 14:54:14 -07:00
2013-05-04 15:03:05 -04:00
2013-05-07 20:16:25 -07:00
2014-07-31 12:53:50 -07:00
2014-09-17 09:04:02 -07:00
2014-02-13 13:48:00 -08:00
2013-05-08 10:13:35 -07:00
2012-12-17 17:15:27 -08:00
2013-05-01 07:21:43 -07:00
2014-06-07 13:25:38 -07:00
2013-02-22 23:31:31 -05:00
2012-12-20 14:04:11 -08:00
2014-05-30 21:52:12 -07:00
2014-02-22 12:41:25 -08:00
2013-03-03 19:36:31 -08:00
2013-03-01 23:51:07 -05:00
2014-04-26 17:15:35 -07:00
2014-06-16 13:42:52 -07:00
2013-06-20 19:02:45 +04:00
2013-02-22 23:31:31 -05:00
2013-04-17 13:25:09 +01:00
2013-04-30 17:04:04 -07:00
2012-12-20 18:46:29 -05:00
2014-05-13 13:59:44 +02:00
2013-05-01 17:51:54 -07:00
2014-02-06 11:08:16 -08:00
2014-09-17 09:04:02 -07:00
2014-09-17 09:04:00 -07:00
2014-05-30 21:52:12 -07:00
2013-12-11 22:36:26 -08:00
2013-05-31 15:16:33 -04:00
2013-05-01 17:51:54 -07:00
2014-06-07 13:25:33 -07:00
2014-02-13 13:48:00 -08:00
2013-02-22 23:31:31 -05:00
2013-02-07 20:51:08 +01:00
2013-11-13 12:05:34 +09:00
2013-03-03 22:58:46 -05:00
2014-02-13 13:47:59 -08:00
2013-02-26 02:46:08 -05:00
2013-10-18 07:45:44 -07:00
2013-08-04 16:51:15 +08:00
2013-03-03 22:46:22 -05:00
2013-03-02 09:35:13 -05:00
2012-12-20 18:50:08 -05:00
2012-12-20 18:50:11 -05:00