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: <45467jgljaishstyj3y6ewlylmsnpwsknhprnsnandnqyh7vvb@t2m5tv7s3tf5>
Date: Tue, 13 Aug 2024 21:37:52 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Wei Yang <richard.weiyang@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        maple-tree@...ts.infradead.org
Subject: Re: [PATCH 2/2] maple_tree: fix comment typo with corresponding
 maple_status

* Wei Yang <richard.weiyang@...il.com> [240812 11:09]:
> In comment of function mas_start(), we list the return value of
> different cases. According to the comment context, tell the maple_status
> here is more consistent with others.
> 
> Let's correct it with ma_active in the case it's a tree.
> 
> Signed-off-by: Wei Yang <richard.weiyang@...il.com>
> ---
>  lib/maple_tree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 14ff54078f9e..026197c44988 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -1347,7 +1347,7 @@ static void mas_node_count(struct ma_state *mas, int count)
>   * - If mas->node is an error or not mas_start, return NULL.
>   * - If it's an empty tree:     NULL & mas->status == ma_none
>   * - If it's a single entry:    The entry & mas->status == ma_root
> - * - If it's a tree:            NULL & mas->status == safe root node.
> + * - If it's a tree:            NULL & mas->status == ma_active

This was obvious fallout from the removal of the mas->node overloading
and adding a status for underflow/overflow.  With this change, the
detail that mas->node == safe root node is lost in favour of the status
being set to active.  Both are important.  Maybe this comment needs
further clearing up to state what mas->node is, but we are basically
documenting what happens in the function so I don't think it's worth
fixing.

Reviewed-by: Liam R. Howlett <Liam.Howlett@...cle.com>

>   */
>  static inline struct maple_enode *mas_start(struct ma_state *mas)
>  {
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ