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: <20180708.130908.2302810149066931900.davem@davemloft.net>
Date:   Sun, 08 Jul 2018 13:09:08 +0900 (KST)
From:   David Miller <davem@...emloft.net>
To:     ap420073@...il.com
Cc:     tgraf@...g.ch, herbert@...dor.apana.org.au, netdev@...r.kernel.org,
        fw@...len.de, pablo@...filter.org
Subject: Re: [PATCH v2] rhashtable: add restart routine in
 rhashtable_free_and_destroy()

From: Taehee Yoo <ap420073@...il.com>
Date: Sun,  8 Jul 2018 11:55:51 +0900

> @@ -1143,13 +1143,14 @@ void rhashtable_free_and_destroy(struct rhashtable *ht,
>  				 void (*free_fn)(void *ptr, void *arg),
>  				 void *arg)
>  {
> -	struct bucket_table *tbl;
> +	struct bucket_table *tbl, *next_tbl;
>  	unsigned int i;
 ...
>  	tbl = rht_dereference(ht->tbl, ht);
> +restart:
>  	if (free_fn) {
 ...
> @@ -1166,7 +1167,12 @@ void rhashtable_free_and_destroy(struct rhashtable *ht,
>  		}
>  	}
>  
> +	next_tbl = rht_dereference(tbl->future_tbl, ht);
>  	bucket_table_free(tbl);
> +	if (next_tbl) {
> +		tbl = next_tbl;
> +		goto restart;
> +	}

This looks good to me, Herbert please review.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ