jfs: fix log->bdev_handle null ptr deref in lbmStartIO
authorLizhi Xu <lizhi.xu@windriver.com>
Mon, 9 Oct 2023 09:45:57 +0000 (17:45 +0800)
committerChristian Brauner <brauner@kernel.org>
Sat, 28 Oct 2023 11:29:22 +0000 (13:29 +0200)
commit6306ff39a7fcb7e9c59a00e6860b933b71a2ed3e
treef3fb80d090096bbe608a458e38f582c5c279bd02
parentb3856da7906257a80a764d3dfc6b25e876a4403c
jfs: fix log->bdev_handle null ptr deref in lbmStartIO

When sbi->flag is JFS_NOINTEGRITY in lmLogOpen(), log->bdev_handle can't
be inited, so it value will be NULL.
Therefore, add the "log ->no_integrity=1" judgment in lbmStartIO() to avoid such
problems.

Reported-and-tested-by: syzbot+23bc20037854bb335d59@syzkaller.appspotmail.com
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Link: https://lore.kernel.org/r/20231009094557.1398920-1-lizhi.xu@windriver.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/jfs/jfs_logmgr.c