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] [day] [month] [year] [list]
Message-ID: <aS809CQLuXlyCcv6@redhat.com>
Date: Tue, 2 Dec 2025 13:50:28 -0500
From: Benjamin Marzinski <bmarzins@...hat.com>
To: Haotian Zhang <vulab@...as.ac.cn>
Cc: Alasdair Kergon <agk@...hat.com>, Mike Snitzer <snitzer@...nel.org>,
        Mikulas Patocka <mpatocka@...hat.com>, dm-devel@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dm log-writes: Add missing set_freezable() for freezable
 kthread

On Mon, Dec 01, 2025 at 03:41:03PM +0800, Haotian Zhang wrote:
> The log_writes_kthread() calls try_to_freeze() but lacks set_freezable(),
> rendering the freeze attempt ineffective since kernel threads are
> non-freezable by default. This prevents proper thread suspension during
> system suspend/hibernate.
> 
> Add set_freezable() to explicitly mark the thread as freezable.
> 

Reviewed-by: Benjamin Marzinski <bmarzins@...hat.com>

> Fixes: 0e9cebe72459 ("dm: add log writes target")
> Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
> ---
>  drivers/md/dm-log-writes.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c
> index 679b07dee229..1f8fbc27a12f 100644
> --- a/drivers/md/dm-log-writes.c
> +++ b/drivers/md/dm-log-writes.c
> @@ -432,6 +432,7 @@ static int log_writes_kthread(void *arg)
>  	struct log_writes_c *lc = arg;
>  	sector_t sector = 0;
>  
> +	set_freezable();
>  	while (!kthread_should_stop()) {
>  		bool super = false;
>  		bool logging_enabled;
> -- 
> 2.50.1.windows.1
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ