Chao Yu
b3d83066cb
f2fs: fix to avoid NULL pointer dereference in f2fs_issue_flush()
...
With below two cases, it will cause NULL pointer dereference when
accessing SM_I(sbi)->fcc_info in f2fs_issue_flush().
a) If kthread_run() fails in f2fs_create_flush_cmd_control(), it will
release SM_I(sbi)->fcc_info,
- mount -o noflush_merge /dev/vda /mnt/f2fs
- mount -o remount,flush_merge /dev/vda /mnt/f2fs -- kthread_run() fails
- dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=1 conv=fsync
b) we will never allocate memory for SM_I(sbi)->fcc_info w/ below
testcase,
- mount -o ro /dev/vda /mnt/f2fs
- mount -o rw,remount /dev/vda /mnt/f2fs
- dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=1 conv=fsync
In order to fix this issue, let change as below:
- fix error path handling in f2fs_create_flush_cmd_control().
- allocate SM_I(sbi)->fcc_info even if readonly is on.
Signed-off-by: Chao Yu <chao@kernel.org >
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org >
2023-01-03 08:58:47 -08:00
..
2022-12-23 11:39:18 -08:00
2022-05-09 16:21:44 -04:00
2022-08-19 13:03:10 +02:00
2022-12-22 11:40:35 +00:00
2022-07-17 17:31:42 -07:00
2022-08-02 12:34:03 -04:00
2022-05-09 16:21:44 -04:00
2023-01-02 11:06:18 -08:00
2022-12-07 10:56:29 +08:00
2022-12-14 10:35:47 -08:00
2022-12-21 10:40:08 -08:00
2022-08-02 12:34:03 -04:00
2022-12-02 11:11:22 +01:00
2022-08-02 12:34:02 -04:00
2022-12-13 10:43:59 -08:00
2022-11-30 16:13:16 -08:00
2022-12-19 17:28:49 -08:00
2022-10-20 10:13:31 +02:00
2022-12-01 09:51:21 +01:00
2022-05-09 16:21:45 -04:00
2022-12-12 20:14:04 -08:00
2022-12-15 18:14:21 -08:00
2022-11-28 12:54:45 -05:00
2022-12-12 20:32:50 -08:00
2022-12-25 13:38:09 -08:00
2023-01-03 08:58:47 -08:00
2022-12-13 19:29:45 -08:00
2022-08-02 12:34:03 -04:00
2022-12-12 18:29:54 -08:00
2022-12-13 19:29:45 -08:00
2022-12-17 08:18:04 -06:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-09-19 22:46:25 +02:00
2022-12-11 18:12:18 -08:00
2022-11-30 15:58:56 -08:00
2022-12-14 10:11:51 -08:00
2022-10-12 11:00:22 -07:00
2022-12-08 21:49:25 -05:00
2022-10-20 10:13:27 +02:00
2022-12-13 19:29:45 -08:00
2022-11-23 19:28:26 +01:00
2022-12-15 09:29:19 -08:00
2022-12-12 20:54:39 -08:00
2022-09-24 07:00:00 +02:00
2022-11-25 13:01:55 -05:00
2022-12-16 03:54:54 -08:00
2022-12-19 09:10:33 -06:00
2022-12-25 13:38:09 -08:00
2022-10-07 08:28:50 -07:00
2022-10-12 11:00:22 -07:00
2023-01-02 10:31:09 -08:00
2022-12-19 17:28:49 -08:00
2022-12-11 18:12:18 -08:00
2022-03-22 15:57:03 -07:00
2022-12-14 11:16:33 -08:00
2022-12-12 20:18:26 -08:00
2022-12-15 11:12:21 -08:00
2022-12-23 11:55:54 -08:00
2022-05-09 16:21:44 -04:00
2022-09-11 21:55:07 -07:00
2022-12-08 21:49:23 -05:00
2022-10-10 19:45:17 -07:00
2022-12-13 09:47:48 -08:00
2022-05-09 16:21:46 -04:00
2022-10-05 01:55:27 -05:00
2022-12-12 20:24:51 -08:00
2022-04-05 15:39:19 +02:00
2022-12-10 14:13:37 -05:00
2022-09-08 17:10:54 -04:00
2022-11-18 02:15:15 +01:00
2022-12-12 20:32:50 -08:00
2022-09-11 20:26:07 -07:00
2022-05-09 16:21:46 -04:00
2022-11-29 21:07:41 -08:00
2022-12-14 10:11:51 -08:00
2022-11-25 17:01:22 +09:00
2022-11-25 13:01:55 -05:00
2022-08-20 11:34:04 -04:00
2022-10-18 10:09:47 +02:00
2022-10-20 10:13:27 +02:00
2022-12-01 19:15:52 -08:00
2022-12-12 18:18:34 -08:00
2022-04-22 10:57:18 -07:00
2022-12-02 13:57:04 -08:00
2022-10-12 11:00:22 -07:00
2022-12-02 17:48:59 +01:00
2022-12-14 12:20:00 -08:00
2022-08-20 11:34:33 -04:00
2022-12-11 18:12:17 -08:00
2022-10-10 19:45:17 -07:00
2022-09-20 08:24:38 -06:00
2022-11-22 06:07:55 -07:00
2022-11-21 07:45:29 -07:00
2022-12-12 19:20:05 -08:00
2022-06-10 16:10:23 -04:00
2022-09-01 17:36:39 -04:00
2022-08-16 10:59:54 -04:00
2022-10-31 15:30:11 -04:00
2022-12-01 10:46:54 -05:00
2022-12-15 18:09:48 -08:00
2022-05-19 23:25:10 -04:00
2022-12-12 19:20:05 -08:00
2022-12-12 19:03:10 -08:00
2022-04-01 19:35:56 -07:00
2022-09-11 20:26:10 -07:00
2022-10-10 14:21:11 -07:00
2022-06-16 19:58:21 -07:00
2022-11-30 16:13:16 -08:00
2022-11-30 05:08:10 -05:00
2022-09-27 07:11:02 -07:00
2022-12-08 21:49:25 -05:00
2022-07-05 16:18:21 -04:00
2022-08-03 10:35:43 -07:00
2022-12-13 09:14:50 -08:00
2022-12-12 19:30:18 -08:00
2022-08-20 11:34:04 -04:00
2022-12-13 09:14:50 -08:00
2022-08-20 11:34:04 -04:00
2022-12-21 14:45:25 +01:00
2022-12-12 19:30:18 -08:00
2022-06-28 13:58:05 -04:00
2022-12-12 18:29:54 -08:00
2022-08-17 17:25:04 -04:00
2022-12-13 10:26:38 -08:00
2022-11-25 13:01:55 -05:00
2022-11-25 13:01:55 -05:00
2022-10-26 10:02:34 +02:00
2022-12-12 18:38:47 -08:00
2022-04-26 13:36:25 -07:00
2022-11-07 12:58:26 -08:00
2022-12-13 10:08:36 -08:00