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: <20220913144112.95690-1-sj@kernel.org>
Date:   Tue, 13 Sep 2022 14:41:12 +0000
From:   SeongJae Park <sj@...nel.org>
To:     xiakaixu1987@...il.com
Cc:     sj@...nel.org, akpm@...ux-foundation.org, damon@...ts.linux.dev,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Kaixu Xia <kaixuxia@...cent.com>
Subject: Re: [PATCH] mm/damon/sysfs: use the wrapper directly to check if the kdamond is running

Hi Kaixu,

On Mon, 12 Sep 2022 23:11:53 +0800 xiakaixu1987@...il.com wrote:

> From: Kaixu Xia <kaixuxia@...cent.com>
> 
> We can use the 'damon_sysfs_kdamond_running()' wrapper directly to
> check if the kdamond is running in 'damon_sysfs_turn_damon_on()'.
> 
> Signed-off-by: Kaixu Xia <kaixuxia@...cent.com>

Reviewed-by: SeongJae Park <sj@...nel.org>


Thanks,
SJ

> ---
>  mm/damon/sysfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
> index 7488e27c87c3..84861c4085a5 100644
> --- a/mm/damon/sysfs.c
> +++ b/mm/damon/sysfs.c
> @@ -2455,8 +2455,7 @@ static int damon_sysfs_turn_damon_on(struct damon_sysfs_kdamond *kdamond)
>  	struct damon_ctx *ctx;
>  	int err;
>  
> -	if (kdamond->damon_ctx &&
> -			damon_sysfs_ctx_running(kdamond->damon_ctx))
> +	if (damon_sysfs_kdamond_running(kdamond))
>  		return -EBUSY;
>  	if (damon_sysfs_cmd_request.kdamond == kdamond)
>  		return -EBUSY;
> -- 
> 2.27.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ