linux-rockchip/fs/ocfs2
Lizhi Xu 01cb2e751c ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate
commit 33b525cef4cff49e216e4133cc48452e11c0391e upstream.

When doing cleanup, if flags without OCFS2_BH_READAHEAD, it may trigger
NULL pointer dereference in the following ocfs2_set_buffer_uptodate() if
bh is NULL.

Link: https://lkml.kernel.org/r/20240902023636.1843422-3-joseph.qi@linux.alibaba.com
Fixes: cf76c78595 ("ocfs2: don't put and assigning null to bh allocated outside")
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reported-by: Heming Zhao <heming.zhao@suse.com>
Suggested-by: Heming Zhao <heming.zhao@suse.com>
Cc: <stable@vger.kernel.org>	[4.20+]
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-17 15:21:57 +02:00
..
cluster ocfs2: Fix use of slab data with sendpage 2023-07-19 16:21:13 +02:00
dlm
dlmfs
acl.c
acl.h
alloc.c
alloc.h
aops.c ocfs2: fix uninit-value in ocfs2_get_block() 2024-10-17 15:21:56 +02:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate 2024-10-17 15:21:57 +02:00
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: add bounds checking to ocfs2_check_dir_entry() 2024-07-27 11:32:18 +02:00
dir.h
dlmglue.c
dlmglue.h
export.c
export.h
extent_map.c
extent_map.h
file.c ocfs2: fix races between hole punching and AIO+DIO 2024-06-21 14:35:56 +02:00
file.h
filecheck.c
filecheck.h
heartbeat.c
heartbeat.h
inode.c
inode.h
ioctl.c
ioctl.h
journal.c ocfs2: fix null-ptr-deref when journal load failed. 2024-10-17 15:21:57 +02:00
journal.h ocfs2: fix DIO failure due to insufficient transaction credits 2024-07-05 09:31:52 +02:00
Kconfig
localalloc.c ocfs2: fix the la space leak when unmounting an ocfs2 volume 2024-10-17 15:21:56 +02:00
localalloc.h
locks.c
locks.h
Makefile
mmap.c
mmap.h
move_extents.c ocfs2: fix non-auto defrag path not working issue 2023-03-10 09:34:09 +01:00
move_extents.h
namei.c ocfs2: use coarse time for new created files 2024-06-21 14:35:56 +02:00
namei.h
ocfs1_fs_compat.h
ocfs2.h
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: fix DIO failure due to insufficient transaction credits 2024-07-05 09:31:52 +02:00
quota.h
quota_global.c
quota_local.c ocfs2: cancel dqi_sync_work before freeing oinfo 2024-10-17 15:21:56 +02:00
refcounttree.c ocfs2: reserve space for inline xattr before attaching reflink tree 2024-10-17 15:21:56 +02:00
refcounttree.h
reservations.c
reservations.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c
stackglue.h
suballoc.c
suballoc.h
super.c ocfs2: fix use-after-free when unmounting read-only filesystem 2023-06-21 16:00:54 +02:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: reserve space for inline xattr before attaching reflink tree 2024-10-17 15:21:56 +02:00
xattr.h