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: <20151203.144558.1956397517705186998.davem@davemloft.net>
Date:	Thu, 03 Dec 2015 14:45:58 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	tom@...bertland.com
Cc:	netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH net-next v2 2/5] rhashtable: add function to replace an
 element

From: Tom Herbert <tom@...bertland.com>
Date: Tue, 1 Dec 2015 15:11:09 -0800

> +	lock = rht_bucket_lock(tbl, hash);
> +
> +	spin_lock_bh(lock);
> +
> +	pprev = &tbl->buckets[hash];
> +	rht_for_each(he, tbl, hash) {
> +		if (he != obj_old) {
> +			pprev = &he->next;
> +			continue;
> +		}
> +
> +		rcu_assign_pointer(obj_new->next, obj_old->next);
> +		rcu_assign_pointer(*pprev, obj_new);
> +		err = 0;
> +		break;

Are you sure this works fine in the presence of both parallel readers and
table expansion passes?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ