[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87wm98aqem.fsf@mail.parknet.co.jp>
Date: Thu, 19 Jun 2025 21:04:33 +0900
From: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To: Li Chen <me@...ux.beauty>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: fat: Prevent fsfuzzer from dominating the console
Li Chen <me@...ux.beauty> writes:
> Signed-off-by: Li Chen <chenl311@...natelecom.cn>
> Reviewed-by: Bin Lai <laib2@...natelecom.cn>
> ---
> fs/fat/misc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
> index c7a2d27120bab..75c2b59fbd532 100644
> --- a/fs/fat/misc.c
> +++ b/fs/fat/misc.c
> @@ -23,8 +23,10 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
> struct fat_mount_options *opts = &MSDOS_SB(sb)->options;
> va_list args;
> struct va_format vaf;
> + static DEFINE_RATELIMIT_STATE(fat_err_rs, DEFAULT_RATELIMIT_INTERVAL,
> + DEFAULT_RATELIMIT_BURST);
>
> - if (report) {
> + if (report && __ratelimit(&fat_err_rs)) {
> va_start(args, fmt);
> vaf.fmt = fmt;
> vaf.va = &args;
Why didn't use fat_fs_error_ratelimit()?
Thanks.
--
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Powered by blists - more mailing lists