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: <20220812015018.115955-1-sj@kernel.org>
Date:   Fri, 12 Aug 2022 01:50:18 +0000
From:   SeongJae Park <sj@...nel.org>
To:     Zeng Jingxiang <zengjx95@...il.com>
Cc:     sj@...nel.org, akpm@...ux-foundation.org, damon@...ts.linux.dev,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Zeng Jingxiang <linuszeng@...cent.com>
Subject: Re: [PATCH] mm/damon: remove dead code in damon_lru_sort_enabled_store()

Hi Zeng,

On Fri, 12 Aug 2022 09:24:59 +0800 Zeng Jingxiang <zengjx95@...il.com> wrote:

> From: Zeng Jingxiang <linuszeng@...cent.com>
> 
> The variable damon_lru_sort_initialized is always true, causing the
> corresponding conditional expression cannot be executed.
> 
> Assigning true to damon_lru_sort_initialized here
> 544         damon_lru_sort_initialized = true;

Before the assignment, the variable is set 'false'.

> 
> The value of damon_lru_sort_initialized is always true.
> As a result, the following expression cannot be executed.
> 
> 463         if (!damon_lru_sort_initialized)
> 464                 return rc;

If this code is executed before the assignment, the expression can be executed.

Actually, there was a bug due to the absence of the variable.  You may refer to
that for the detail:
https://lore.kernel.org/damon/20220604192222.1488-1-sj@kernel.org/T/#t


Thanks,
SJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ