Re: [PATCH 1/2] rhashtable: Introduce rhashtable_walk_*

From
Herbert Xu <herbert@gondor.apana.org.au>
Date
2015-01-26 22:23:35
Also in
netfilter-devel
Reply to
David Laight, 2015-01-26
On Mon, Jan 26, 2015 at 10:09:24AM +0000, David Laight wrote:
That doesn't look right to me.
Surely you shouldn't be calling rcu_read_lock() when the mutex
request is interrupted.

So maybe:
	err = mutex_lock_interruptible(&ht->mutex);
	if (err)
		return err;
	rcu_read_lock();
No, we need to grab the RCU read lock while holding the mutex
in order to prevent future resizes from happening once we release
the mutex.

We don't want to hold the mutex which would stop other walks from
starting.

Cheers,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Thread (79 messages) 79 messages, 6 authors, last reply 2015-02-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help