From: Chao Yu <chao@kernel.org>
To: Dongliang Mu <dzm91@hust.edu.cn>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org,
syzbot+763ae12a2ede1d99d4dc@syzkaller.appspotmail.com,
Dongliang Mu <mudongliangabcd@gmail.com>,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr
Date: Sat, 9 Apr 2022 08:27:14 +0800 [thread overview]
Message-ID: <f125ece9-872e-39d9-48a5-15b85508f6b6@kernel.org> (raw)
In-Reply-To: <20220408052207.209856-1-dzm91@hust.edu.cn>
On 2022/4/8 13:22, Dongliang Mu wrote:
> From: Dongliang Mu <mudongliangabcd@gmail.com>
>
> In f2fs_is_valid_blkaddr, if type is DATA_GENERIC_ENHANCE or
> DATA_GENERIC_ENHANCE_READ, it invokes WARN_ON(1) not matter
> blkaddr is in the range or not.
If we run into the path where we invoke WARN_ON(1) in f2fs_is_valid_blkaddr(),
It means f2fs image may be broken, or there is a bug in f2fs.
So, do you suffer any related issue in your environment?
Thanks,
>
> Fix this by removing WARN_ON.
>
> Note that, syzbot patch testing does not incur any further issues
>
> Reported-by: syzbot+763ae12a2ede1d99d4dc@syzkaller.appspotmail.com
> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
> ---
> fs/f2fs/checkpoint.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index f5366feea82d..521498b2dd8c 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -158,7 +158,6 @@ static bool __is_bitmap_valid(struct f2fs_sb_info *sbi, block_t blkaddr,
> f2fs_err(sbi, "Inconsistent error blkaddr:%u, sit bitmap:%d",
> blkaddr, exist);
> set_sbi_flag(sbi, SBI_NEED_FSCK);
> - WARN_ON(1);
> }
> return exist;
> }
> @@ -196,7 +195,6 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
> f2fs_warn(sbi, "access invalid blkaddr:%u",
> blkaddr);
> set_sbi_flag(sbi, SBI_NEED_FSCK);
> - WARN_ON(1);
> return false;
> } else {
> return __is_bitmap_valid(sbi, blkaddr, type);
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao@kernel.org>
To: Dongliang Mu <dzm91@hust.edu.cn>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Dongliang Mu <mudongliangabcd@gmail.com>,
syzbot+763ae12a2ede1d99d4dc@syzkaller.appspotmail.com,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr
Date: Sat, 9 Apr 2022 08:27:14 +0800 [thread overview]
Message-ID: <f125ece9-872e-39d9-48a5-15b85508f6b6@kernel.org> (raw)
In-Reply-To: <20220408052207.209856-1-dzm91@hust.edu.cn>
On 2022/4/8 13:22, Dongliang Mu wrote:
> From: Dongliang Mu <mudongliangabcd@gmail.com>
>
> In f2fs_is_valid_blkaddr, if type is DATA_GENERIC_ENHANCE or
> DATA_GENERIC_ENHANCE_READ, it invokes WARN_ON(1) not matter
> blkaddr is in the range or not.
If we run into the path where we invoke WARN_ON(1) in f2fs_is_valid_blkaddr(),
It means f2fs image may be broken, or there is a bug in f2fs.
So, do you suffer any related issue in your environment?
Thanks,
>
> Fix this by removing WARN_ON.
>
> Note that, syzbot patch testing does not incur any further issues
>
> Reported-by: syzbot+763ae12a2ede1d99d4dc@syzkaller.appspotmail.com
> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
> ---
> fs/f2fs/checkpoint.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
> index f5366feea82d..521498b2dd8c 100644
> --- a/fs/f2fs/checkpoint.c
> +++ b/fs/f2fs/checkpoint.c
> @@ -158,7 +158,6 @@ static bool __is_bitmap_valid(struct f2fs_sb_info *sbi, block_t blkaddr,
> f2fs_err(sbi, "Inconsistent error blkaddr:%u, sit bitmap:%d",
> blkaddr, exist);
> set_sbi_flag(sbi, SBI_NEED_FSCK);
> - WARN_ON(1);
> }
> return exist;
> }
> @@ -196,7 +195,6 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
> f2fs_warn(sbi, "access invalid blkaddr:%u",
> blkaddr);
> set_sbi_flag(sbi, SBI_NEED_FSCK);
> - WARN_ON(1);
> return false;
> } else {
> return __is_bitmap_valid(sbi, blkaddr, type);
next prev parent reply other threads:[~2022-04-09 0:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-08 5:22 [f2fs-dev] [PATCH] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr Dongliang Mu
2022-04-08 5:22 ` Dongliang Mu
2022-04-09 0:27 ` Chao Yu [this message]
2022-04-09 0:27 ` Chao Yu
2022-04-09 1:34 ` [f2fs-dev] " Dongliang Mu
2022-04-09 1:34 ` Dongliang Mu
2022-04-09 3:46 ` [f2fs-dev] " Chao Yu
2022-04-09 3:46 ` Chao Yu
2022-04-09 6:42 ` [f2fs-dev] " Dongliang Mu
2022-04-09 6:42 ` Dongliang Mu
2022-04-11 3:09 ` [f2fs-dev] " Chao Yu
2022-04-11 3:09 ` Chao Yu
2022-04-11 5:06 ` Dongliang Mu
2022-04-11 5:06 ` Dongliang Mu
2022-04-11 6:14 ` Eric Biggers
2022-04-11 6:14 ` Eric Biggers
2022-04-11 9:53 ` Chao Yu
2022-04-11 9:53 ` Chao Yu
2022-04-12 9:25 ` Dongliang Mu
2022-04-12 9:25 ` Dongliang Mu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f125ece9-872e-39d9-48a5-15b85508f6b6@kernel.org \
--to=chao@kernel.org \
--cc=dzm91@hust.edu.cn \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mudongliangabcd@gmail.com \
--cc=syzbot+763ae12a2ede1d99d4dc@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.