All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Blakey <paulb@mellanox.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: paulb@mellanox.com, Thomas Graf <tgraf@suug.ch>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] test_rhashtable: Add missing rcu_read_lock()
Date: Thu, 8 Mar 2018 19:10:47 +0200	[thread overview]
Message-ID: <cc3d357d-b3f5-e363-cd4a-dbf02a412acb@mellanox.com> (raw)
In-Reply-To: <20180308155838.GA9696@gondor.apana.org.au>



On 08/03/2018 17:58, Herbert Xu wrote:
> On Thu, Mar 08, 2018 at 01:54:57PM +0200, Paul Blakey wrote:
>> 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 <paulb@mellanox.com>
> 
> 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) ]]

  reply	other threads:[~2018-03-08 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 11:54 [PATCH net] test_rhashtable: Add missing rcu_read_lock() Paul Blakey
2018-03-08 15:58 ` Herbert Xu
2018-03-08 17:10   ` Paul Blakey [this message]
2018-03-09 15:04     ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc3d357d-b3f5-e363-cd4a-dbf02a412acb@mellanox.com \
    --to=paulb@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.