Re: [PATCH 4.19 5.4] nilfs2: replace WARN_ONs for invalid DAT metadata block requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 22, 2024 at 01:36:24AM +0900, Ryusuke Konishi wrote:
> commit 5124a0a549857c4b87173280e192eea24dea72ad upstream.
> 
> If DAT metadata file block access fails due to corruption of the DAT file
> or abnormal virtual block numbers held by b-trees or inodes, a kernel
> warning is generated.
> 
> This replaces the WARN_ONs by error output, so that a kernel, booted with
> panic_on_warn, does not panic.  This patch also replaces the detected
> return code -ENOENT with another internal code -EINVAL to notify the bmap
> layer of metadata corruption.  When the bmap layer sees -EINVAL, it
> handles the abnormal situation with nilfs_bmap_convert_error() and finally
> returns code -EIO as it should.
> 
> Link: https://lkml.kernel.org/r/0000000000005cc3d205ea23ddcf@xxxxxxxxxx
> Link: https://lkml.kernel.org/r/20230126164114.6911-1-konishi.ryusuke@xxxxxxxxx
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
> Reported-by: <syzbot+5d5d25f90f195a3cfcb4@xxxxxxxxxxxxxxxxxxxxxxxxx>
> Tested-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
> Please use this patch for these versions instead of the patch I asked
> you to drop in the previous review comments.
> 
> This replacement patch uses an equivalent call using nilfs_msg()
> instead of nilfs_err(), which does not exist in these versions.

Now queued up, thanks.

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux