linux-stable/fs/nilfs2
Ryusuke Konishi 259c0f6816 nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
commit 723ac75120 upstream.

If creation or finalization of a checkpoint fails due to anomalies in the
checkpoint metadata on disk, a kernel warning is generated.

This patch replaces the WARN_ONs by nilfs_error, so that a kernel, booted
with panic_on_warn, does not panic.  A nilfs_error is appropriate here to
handle the abnormal filesystem condition.

This also replaces the detected error codes with an I/O error so that
neither of the internal error codes is returned to callers.

Link: https://lkml.kernel.org/r/20220929123330.19658-1-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: syzbot+fbb3e0b24e8dae5a16ee@syzkaller.appspotmail.com
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-15 07:54:39 +02:00
..
alloc.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
alloc.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
bmap.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
bmap.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
btnode.c nilfs2: fix lockdep warnings in page operations for btree nodes 2022-05-25 09:14:33 +02:00
btnode.h nilfs2: fix lockdep warnings in page operations for btree nodes 2022-05-25 09:14:33 +02:00
btree.c nilfs2: fix lockdep warnings in page operations for btree nodes 2022-05-25 09:14:33 +02:00
btree.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
cpfile.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
cpfile.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
dat.c nilfs2: fix lockdep warnings during disk space reclamation 2022-05-25 09:14:33 +02:00
dat.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
dir.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
direct.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
direct.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
export.h
file.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
gcinode.c nilfs2: fix lockdep warnings in page operations for btree nodes 2022-05-25 09:14:33 +02:00
ifile.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
ifile.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
inode.c nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level() 2022-10-15 07:54:38 +02:00
ioctl.c vfs: create a generic checking and prep function for FS_IOC_SETFLAGS 2019-07-01 08:25:34 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
mdt.c nilfs2: fix lockdep warnings during disk space reclamation 2022-05-25 09:14:33 +02:00
mdt.h nilfs2: fix lockdep warnings during disk space reclamation 2022-05-25 09:14:33 +02:00
namei.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
nilfs.h nilfs2: fix incorrect masking of permission flags for symlinks 2022-07-21 20:59:18 +02:00
page.c nilfs2: fix lockdep warnings in page operations for btree nodes 2022-05-25 09:14:33 +02:00
page.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
recovery.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
segbuf.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
segbuf.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
segment.c nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure 2022-10-15 07:54:39 +02:00
segment.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
sufile.c nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
sufile.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
super.c nilfs2: fix lockdep warnings in page operations for btree nodes 2022-05-25 09:14:33 +02:00
sysfs.c nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group 2021-09-26 14:07:13 +02:00
sysfs.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00
the_nilfs.c nilfs2: use refcount_dec_and_lock() to fix potential UAF 2021-09-26 14:07:09 +02:00
the_nilfs.h nilfs2: convert to SPDX license tags 2018-09-04 16:45:02 -07:00