[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150313103259.GC11089@casper.infradead.org>
Date: Fri, 13 Mar 2015 10:32:59 +0000
From: Thomas Graf <tgraf@...g.ch>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: netdev@...r.kernel.org
Subject: Re: rhashtable: Fix reader/rehash race
On 03/13/15 at 08:49am, Herbert Xu wrote:
> It doesn't matter. The wmb/smb guarauntees that if the reader
> cannot find the element in the old table then it must see the
> new table pointer. Vice versa if it cannot see the new table
> pointer then the element (if it existed at all) must be in the
> old table.
I understand what you are doing now. I was still thinking
of entries being on both lists in parallel.
One last question though. What about rhashtable_remove()?
The spin_unlock_bh() in __rhashtable_remove() only guarantees
for loads before the release to be completed. The future_tbl
load could still be reordered before the traversal is complete.
I think it needs an smp_rmb() as well.
--
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