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]
Date: Thu, 6 Jul 2023 20:50:58 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Wang Ming <machel@...o.com>, tipc-discussion@...ts.sourceforge.net,
 netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Jon Maloy <jmaloy@...hat.com>,
 Paolo Abeni <pabeni@...hat.com>, Ying Xue <ying.xue@...driver.com>
Cc: opensource.kernel@...o.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: tipc: Remove repeated “initialization”

> The original code initializes 'tmp' twice,
> which causes duplicate initialization issue.

Is it more appropriate to refer to a repetition of questionable variable assignments?


> To fix this, we remove the second initialization
> of 'tmp' and use 'parent' directly forsubsequent
> operations.

* Would you like to avoid a typo in this sentence?

* Please choose a better imperative change suggestion.

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.4#n94


…
> +++ b/net/tipc/group.c
> @@ -284,8 +284,6 @@ static int tipc_group_add_to_tree(struct tipc_group *grp,
>  	n = &grp->members.rb_node;
>  	while (*n) {
>  		tmp = container_of(*n, struct tipc_member, tree_node);
> -		parent = *n;
> -		tmp = container_of(parent, struct tipc_member, tree_node);
>  		nkey = (u64)tmp->node << 32 | tmp->port;
…

How does the proposed deletion fit to the function call “rb_link_node(&m->tree_node, parent, n)”
after the loop?
https://elixir.bootlin.com/linux/v6.4.2/source/net/tipc/group.c#L277

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ