diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-02-05 19:13:39 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-02-07 10:39:28 -0800 |
commit | 267c159f9c7bcb7009dae16889b880c5ed8759a8 (patch) | |
tree | 068e7d8a984d8a5c40bdbc53f1f2d00b7fdc9c7b /fs/f2fs/namei.c | |
parent | d9bac032ac0de8f510b44904b6eb7272679883d1 (diff) | |
download | linux-stable-267c159f9c7bcb7009dae16889b880c5ed8759a8.tar.gz linux-stable-267c159f9c7bcb7009dae16889b880c5ed8759a8.tar.bz2 linux-stable-267c159f9c7bcb7009dae16889b880c5ed8759a8.zip |
f2fs: fix kernel crash due to null io->bio
We should return when io->bio is null before doing anything. Otherwise, panic.
BUG: kernel NULL pointer dereference, address: 0000000000000010
RIP: 0010:__submit_merged_write_cond+0x164/0x240 [f2fs]
Call Trace:
<TASK>
f2fs_submit_merged_write+0x1d/0x30 [f2fs]
commit_checkpoint+0x110/0x1e0 [f2fs]
f2fs_write_checkpoint+0x9f7/0xf00 [f2fs]
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
__checkpoint_and_complete_reqs+0x84/0x190 [f2fs]
? preempt_count_add+0x82/0xc0
? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
issue_checkpoint_thread+0x4c/0xf0 [f2fs]
? __pfx_autoremove_wake_function+0x10/0x10
kthread+0xff/0x130
? __pfx_kthread+0x10/0x10
ret_from_fork+0x2c/0x50
</TASK>
Cc: stable@vger.kernel.org # v5.18+
Fixes: 64bf0eef0171 ("f2fs: pass the bio operation to bio_alloc_bioset")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
0 files changed, 0 insertions, 0 deletions