lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39e01b9d-2681-459a-84a2-f96ade679764@acm.org>
Date: Mon, 17 Nov 2025 08:54:35 -0800
From: Bart Van Assche <bvanassche@....org>
To: Li Chen <me@...ux.beauty>, Jens Axboe <axboe@...nel.dk>,
 linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org
Subject: Re: [PATCH] block: rate-limit capacity change info log

On 11/16/25 9:34 PM, Li Chen wrote:
> From: Li Chen <chenl311@...natelecom.cn>
> 
> loop devices under heavy stress-ng loop streessor can trigger many
> capacity change events in a short time. Each event prints an info
> message from set_capacity_and_notify(), flooding the console and
> contributing to soft lockups on slow consoles.
> 
> Switch the printk in set_capacity_and_notify() to
> pr_info_ratelimited() so frequent capacity changes do not spam
> the log while still reporting occasional changes.
> 
> Cc: stable@...r.kernel.org
> Signed-off-by: Li Chen <chenl311@...natelecom.cn>
> ---
>   block/genhd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/genhd.c b/block/genhd.c
> index 9bbc38d12792..bd3a6841e5b5 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -90,7 +90,7 @@ bool set_capacity_and_notify(struct gendisk *disk, sector_t size)
>   	    (disk->flags & GENHD_FL_HIDDEN))
>   		return false;
>   
> -	pr_info("%s: detected capacity change from %lld to %lld\n",
> +	pr_info_ratelimited("%s: detected capacity change from %lld to %lld\n",
>   		disk->disk_name, capacity, size);
>   
>   	/*

Reviewed-by: Bart Van Assche <bvanassche@....org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ