Thread (4 messages) 4 messages, 2 authors, 2018-03-09

Re: [PATCH net] test_rhashtable: Add missing rcu_read_lock()

flat view

From: Paul Blakey <hidden>
Date: 2018-03-08 17:11:02


On 08/03/2018 17:58, Herbert Xu wrote:
On Thu, Mar 08, 2018 at 01:54:57PM +0200, Paul Blakey wrote:
quoted
Suppress "suspicious rcu_dereference_protected() usage!" on duplicate
insertion test.

Fixes: 499ac3b60f65 ('test_rhashtable: add test case for rhl_table with duplicate objects')
Signed-off-by: Paul Blakey <redacted>
This shouldn't be doing a table walk in the first place.

You should convert it to using the table walk interface.

Direct table walks are forbidden because they will break when
you hit a resize.

Cheers,

I know but I wanted to show the inner structure for the failure case, iirc walk doesn't provide this.

               ---- ht: ----
               bucket[1] -> [[ val 1 (tid=0) ]] -> [[ val 21 (tid=1) ]]
               -------------
[ 3599.715501]
               ---- ht: ----
               bucket[1] -> [[ val 1 (tid=2),  val 1 (tid=0) ]] -> [[ val 21 (tid=1) ]]
               -------------
[ 3599.738600]
               ---- ht: ----
               bucket[1] -> [[ val 21 (tid=1) ]] -> [[ val 1 (tid=0) ]]
               -------------
[ 3599.759443]
               ---- ht: ----
               bucket[1] -> [[ val 21 (tid=1) ]] -> [[ val 1 (tid=2), val 1 (tid=0) ]]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help