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: <20241021191100.84191-1-kuniyu@amazon.com>
Date: Mon, 21 Oct 2024 12:11:00 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <gnaaman@...venets.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<kuniyu@...zon.com>, <netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH net-next v6 1/6] neighbour: Add hlist_node to struct neighbour

From: Gilad Naaman <gnaaman@...venets.com>
Date: Mon, 21 Oct 2024 10:20:53 +0000
> @@ -530,27 +532,47 @@ static void neigh_get_hash_rnd(u32 *x)
>  
>  static struct neigh_hash_table *neigh_hash_alloc(unsigned int shift)
>  {
> +	size_t hash_heads_size = (1 << shift) * sizeof(struct hlist_head);
>  	size_t size = (1 << shift) * sizeof(struct neighbour *);
> -	struct neigh_hash_table *ret;
>  	struct neighbour __rcu **buckets;
> +	struct hlist_head *hash_heads;
> +	struct neigh_hash_table *ret;
>  	int i;
>  
> +	hash_heads = NULL;

nit: This init is not needed.


> @@ -564,6 +586,8 @@ static void neigh_hash_free_rcu(struct rcu_head *head)
>  						    rcu);
>  	size_t size = (1 << nht->hash_shift) * sizeof(struct neighbour *);
>  	struct neighbour __rcu **buckets = nht->hash_buckets;
> +	size_t hash_heads_size = (1 << nht->hash_shift) * sizeof(struct hlist_head);
> +	struct hlist_head *hash_heads = nht->hash_heads;

nit: reverse xmas tree order.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ