Jingbo Xu
00432384ec
erofs: fix NULL dereference of dif->bdev_handle in fscache mode
...
commit 8bd90b6ae7856dd5000b75691d905b39b9ea5d6b upstream.
Avoid NULL dereference of dif->bdev_handle, as dif->bdev_handle is NULL
in fscache mode.
BUG: kernel NULL pointer dereference, address: 0000000000000000
RIP: 0010:erofs_map_dev+0xbd/0x1c0
Call Trace:
<TASK>
erofs_fscache_data_read_slice+0xa7/0x340
erofs_fscache_data_read+0x11/0x30
erofs_fscache_readahead+0xd9/0x100
read_pages+0x47/0x1f0
page_cache_ra_order+0x1e5/0x270
filemap_get_pages+0xf2/0x5f0
filemap_read+0xb8/0x2e0
vfs_read+0x18d/0x2b0
ksys_read+0x53/0xd0
do_syscall_64+0x42/0xf0
entry_SYSCALL_64_after_hwframe+0x6e/0x76
Reported-by: Yiqun Leng <yqleng@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7245
Fixes: 49845720080d ("erofs: Convert to use bdev_open_by_path()")
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20231114070704.23398-1-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 09:34:05 +02:00
..
2024-06-16 13:47:37 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-06-16 13:47:30 +02:00
2023-08-28 11:39:14 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-07-05 09:34:02 +02:00
2024-06-21 14:38:47 +02:00
2024-04-27 17:11:29 +02:00
2023-08-28 09:31:32 -07:00
2023-07-13 10:28:05 +02:00
2023-08-28 11:04:18 -07:00
2024-01-20 11:51:37 +01:00
2023-08-28 10:17:14 -07:00
2024-06-12 11:11:38 +02:00
2024-06-12 11:11:31 +02:00
2024-03-06 14:48:41 +00:00
2023-08-29 20:21:42 -07:00
2024-07-05 09:34:05 +02:00
2023-11-28 17:19:44 +00:00
2023-08-29 17:45:22 -04:00
2024-03-26 18:19:46 -04:00
2024-06-27 13:49:10 +02:00
2024-06-27 13:49:04 +02:00
2024-04-03 15:28:20 +02:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:19:01 -08:00
2024-04-27 17:11:42 +02:00
2024-07-05 09:33:52 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:00 +02:00
2023-08-29 20:21:42 -07:00
2024-02-23 09:25:16 +01:00
2024-06-16 13:47:40 +02:00
2024-04-13 13:07:34 +02:00
2024-01-20 11:51:43 +01:00
2024-06-12 11:11:33 +02:00
2024-06-21 14:38:24 +02:00
2024-04-13 13:07:38 +02:00
2023-08-29 17:45:22 -04:00
2023-08-29 20:21:42 -07:00
2023-09-18 12:03:46 -07:00
2024-07-05 09:33:55 +02:00
2024-06-21 14:38:40 +02:00
2024-06-21 14:38:46 +02:00
2023-08-31 12:07:34 -05:00
2023-10-19 16:19:20 +02:00
2023-08-29 20:21:42 -07:00
2024-06-12 11:12:39 +02:00
2024-07-05 09:33:54 +02:00
2023-08-29 20:21:42 -07:00
2024-06-12 11:11:30 +02:00
2024-04-13 13:07:35 +02:00
2024-06-27 13:49:12 +02:00
2024-06-21 14:38:41 +02:00
2024-04-13 13:07:31 +02:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-03-26 18:19:46 -04:00
2023-07-24 10:30:04 +02:00
2024-03-26 18:19:46 -04:00
2023-08-29 20:21:42 -07:00
2024-06-27 13:49:11 +02:00
2024-05-02 16:32:41 +02:00
2024-04-27 17:11:41 +02:00
2024-04-13 13:07:34 +02:00
2024-06-21 14:38:22 +02:00
2024-04-03 15:28:20 +02:00
2024-06-27 13:49:04 +02:00
2023-08-29 20:21:42 -07:00
2024-05-17 12:02:13 +02:00
2024-06-16 13:47:33 +02:00
2024-06-21 14:38:45 +02:00
2024-02-23 09:25:13 +01:00
2024-04-03 15:28:44 +02:00
2023-08-28 10:17:14 -07:00
2023-08-11 09:04:57 +02:00
2023-09-29 17:20:45 -07:00
2023-06-28 20:35:21 -07:00
2023-07-13 10:28:04 +02:00
2023-09-25 08:55:00 -07:00
2023-06-26 09:50:21 -07:00
2024-01-10 17:16:53 +01:00
2024-02-05 20:14:26 +00:00
2023-06-28 10:28:11 -07:00
2023-08-18 10:12:11 -07:00
2023-07-11 11:41:34 +02:00
2024-06-12 11:11:30 +02:00
2024-04-03 15:28:55 +02:00
2024-03-26 18:19:17 -04:00
2024-03-26 18:19:15 -04:00
2023-08-08 19:36:51 +02:00
2023-08-28 10:17:14 -07:00
2023-10-12 18:53:36 +03:00
2023-08-21 13:46:25 -07:00
2024-06-27 13:49:00 +02:00
2023-08-14 18:48:02 +02:00
2023-12-03 07:33:03 +01:00
2023-08-29 20:21:42 -07:00
2024-01-31 16:18:54 -08:00
2023-08-29 20:21:42 -07:00
2023-08-23 14:17:43 -07:00
2023-08-19 12:12:12 +02:00
2024-01-05 15:19:40 +01:00
2023-08-31 15:32:18 -07:00
2023-08-02 09:13:09 -06:00
2024-01-31 16:18:57 -08:00
2024-02-23 09:25:15 +01:00
2023-07-13 10:28:04 +02:00
2024-07-05 09:34:04 +02:00
2024-04-10 16:35:57 +02:00
2023-07-13 10:28:04 +02:00
2023-08-15 08:32:45 +02:00
2023-08-06 15:08:35 +02:00
2024-03-26 18:19:17 -04:00
2023-08-29 14:25:26 -07:00
2023-07-13 10:28:04 +02:00
2023-12-03 07:33:03 +01:00
2023-08-31 12:47:15 +02:00
2024-05-17 12:02:36 +02:00
2023-08-22 10:57:46 +02:00