Chao Yu
73545817c9
f2fs: fix null pointer dereference when issuing flush in ->fsync
...
We only allocate flush merge control structure sbi::sm_info::fcc_info when
flush_merge option is on, but in f2fs_issue_flush we still try to access
member of the control structure without that option, it incurs panic as
show below, fix it.
Call Trace:
__remove_ino_entry+0xa9/0xc0 [f2fs]
f2fs_do_sync_file.isra.27+0x214/0x6d0 [f2fs]
f2fs_sync_file+0x18/0x20 [f2fs]
vfs_fsync_range+0x3d/0xb0
__do_page_fault+0x261/0x4d0
do_fsync+0x3d/0x70
SyS_fsync+0x10/0x20
do_syscall_64+0x6e/0x180
entry_SYSCALL64_slow_path+0x25/0x25
RIP: 0033:0x7f18ce260de0
RSP: 002b:00007ffdd4589258 EFLAGS: 00000246 ORIG_RAX: 000000000000004a
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f18ce260de0
RDX: 0000000000000006 RSI: 00000000016c0360 RDI: 0000000000000003
RBP: 00000000016c0360 R08: 000000000000ffff R09: 000000000000001f
R10: 00007ffdd4589020 R11: 0000000000000246 R12: 00000000016c0100
R13: 0000000000000000 R14: 00000000016c1f00 R15: 00000000016c0100
Code: fb 81 e3 00 08 00 00 48 89 45 a0 0f 1f 44 00 00 31 c0 85 db 75 27 41 81 e7 00 04 00 00 74 0c 41 8b 45 20 85 c0 0f 85 81 00 00 00 <f0> 41 ff 45 20 4c 89 e7 e8 f8 e9 ff ff f0 41 ff 4d 20 48 83 c4
RIP: f2fs_issue_flush+0x5b/0x170 [f2fs] RSP: ffffc90003b5fd78
CR2: 0000000000000020
---[ end trace a09314c24f037648 ]---
Reported-by: Shuoran Liu <liushuoran@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-02-22 20:24:52 -08:00
..
2016-12-24 11:46:01 -08:00
2016-10-10 20:16:43 -07:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2016-12-22 11:25:24 +00:00
2016-12-24 11:46:01 -08:00
2017-01-27 12:41:46 -08:00
2016-10-10 20:16:43 -07:00
2017-01-18 17:58:45 +01:00
2016-12-24 11:46:01 -08:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-31 00:47:05 -05:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2016-12-25 17:21:23 +01:00
2016-12-09 16:45:04 +01:00
2016-10-10 20:16:43 -07:00
2016-12-24 11:46:01 -08:00
2016-12-10 14:25:19 -05:00
2016-10-06 09:07:44 -04:00
2017-01-24 16:26:14 -08:00
2017-01-24 16:26:14 -08:00
2017-02-22 20:24:52 -08:00
2016-10-10 20:16:43 -07:00
2017-01-13 17:20:47 +01:00
2016-12-25 17:21:22 +01:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-09 16:45:04 +01:00
2016-10-10 20:16:43 -07:00
2016-12-24 11:46:01 -08:00
2016-12-13 10:19:16 -08:00
2016-12-24 11:46:01 -08:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2016-11-18 10:59:15 -05:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2017-01-26 15:50:41 -05:00
2016-11-18 10:59:15 -05:00
2017-01-12 15:55:51 -05:00
2016-12-17 19:16:12 -08:00
2017-01-05 23:06:06 -08:00
2016-12-24 11:46:01 -08:00
2017-01-10 18:31:54 -08:00
2016-10-10 20:16:43 -07:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2017-01-18 15:19:54 +01:00
2017-01-24 16:26:14 -08:00
2016-12-13 09:16:11 -08:00
2016-12-19 08:23:53 -08:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2017-01-24 16:26:14 -08:00
2016-12-17 19:16:12 -08:00
2016-10-14 12:18:50 -07:00
2016-12-09 16:45:04 +01:00
2016-09-27 21:06:21 -04:00
2017-01-17 14:35:58 +01:00
2016-11-01 09:43:26 -06:00
2016-12-24 11:46:01 -08:00
2017-01-27 09:32:30 -08:00
2017-01-14 19:31:40 -05:00
2016-12-24 11:46:01 -08:00
2016-10-10 20:16:43 -07:00
2016-12-09 11:57:43 +01:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-01-14 19:32:40 -05:00
2016-08-02 19:35:15 -04:00
2016-07-28 13:29:12 +10:00
2016-09-27 21:06:22 -04:00
2017-01-24 07:55:53 -07:00
2017-01-02 09:35:14 -07:00
2016-08-23 22:58:51 -07:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-01-14 19:32:40 -05:00
2017-01-24 16:26:14 -08:00
2017-01-10 13:34:43 +13:00
2016-12-24 11:46:01 -08:00
2017-01-10 13:29:54 -07:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-05 19:01:16 -05:00
2016-09-27 18:47:38 -04:00
2016-12-24 11:46:01 -08:00
2016-12-12 18:55:08 -08:00
2016-10-10 20:16:43 -07:00
2016-12-17 18:44:00 -08:00
2016-12-16 11:02:54 +01:00
2016-12-14 21:35:31 -08:00
2017-01-24 16:26:14 -08:00
2016-10-24 08:12:35 -02:00
2017-01-10 13:34:55 +13:00
2016-12-24 11:46:01 -08:00
2016-12-14 23:48:11 -05:00
2016-12-03 15:55:01 -05:00
2016-12-03 20:51:35 -05:00
2016-11-04 14:34:47 -06:00
2016-12-24 11:46:01 -08:00
2017-01-10 13:34:43 +13:00
2016-10-31 10:56:36 -04:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-16 16:30:49 -05:00
2016-09-30 12:46:48 -05:00
2017-01-10 01:29:48 -05:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-21 10:59:34 -08:00
2016-12-24 11:46:01 -08:00
2016-12-05 19:03:49 -05:00
2016-11-30 08:38:07 +01:00
2016-12-25 17:21:22 +01:00
2017-01-24 16:26:14 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00