From: Fengguang Wu <fengguang.wu@intel.com>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, eric.dumazet@gmail.com,
ying.huang@linux.intel.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, colin.king@canonical.com, lkp@01.org
Subject: Re: [LKP] [PATCH v2] rhashtable: Kill harmless RCU warning in rhashtable_walk_init
Date: Sat, 19 Dec 2015 12:47:59 +0800 [thread overview]
Message-ID: <20151219044759.GA15236@wfg-t540p.sh.intel.com> (raw)
In-Reply-To: <20151218.234259.445944618583370177.davem@davemloft.net>
On Fri, Dec 18, 2015 at 11:42:59PM -0500, David Miller wrote:
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Sat, 19 Dec 2015 10:45:28 +0800
>
> > On Fri, Dec 18, 2015 at 04:27:31PM -0500, David Miller wrote:
> >> From: Herbert Xu <herbert@gondor.apana.org.au>
> >> Date: Fri, 18 Dec 2015 21:14:08 +0800
> >>
> >> > On Fri, Dec 18, 2015 at 04:54:14AM -0800, Eric Dumazet wrote:
> >> >>
> >> >> You can avoid the comment by using the self documented and lockdep
> >> >> enabled primitive
> >> >>
> >> >> iter->walker->tbl = rcu_dereference_protected(ht->tbl,
> >> >> lockdep_is_held(&ht->lock));
> >> >
> >> > That is just gross. I think a comment is much better in this case.
> >>
> >> Herbert, this macro was created exactly to handle this situation,
> >> and this is what we do everywhere else in the tree.
> >
> > OK.
> >
> > ---8<---
> > The commit f9f51b8070be3e829100614a7372b219723b864f ("rhashtable:
> > Fix walker list corruption") causes a suspicious RCU usage warning
> > because we no longer hold ht->mutex when we dereference ht->tbl.
> >
> > However, this is a false positive because we now hold ht->lock
> > which also guarantees that ht->tbl won't disppear from under us.
> >
> > This patch kills the warning by using rcu_dereference_protected.
> >
> > Reported-by: kernel test robot <ying.huang@linux.intel.com>
> > Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> The correct commti SHA1 is c6ff5268293ef98e48a99597e765ffc417e39fa5.
>
> Or at least, when I run:
>
> git show f9f51b8070be3e829100614a7372b219723b864f
>
> I get:
>
> fatal: bad object f9f51b8070be3e829100614a7372b219723b864f
>
> :-)
Oops, that commit comes from 0day robot :-)
> https://github.com/0day-ci/linux Herbert-Xu/rhashtable-Fix-walker-list-corruption/20151216-164833
> commit f9f51b8070be3e829100614a7372b219723b864f ("rhashtable: Fix walker list corruption")
commit f9f51b8070be3e829100614a7372b219723b864f
Author: Herbert Xu <herbert@gondor.apana.org.au>
AuthorDate: Wed Dec 16 16:45:54 2015 +0800
Commit: 0day robot <fengguang.wu@intel.com>
CommitDate: Wed Dec 16 16:48:36 2015 +0800
rhashtable: Fix walker list corruption
Thanks,
Fengguang
prev parent reply other threads:[~2015-12-19 4:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-18 1:39 [lkp] [rhashtable] f9f51b8070: INFO: suspicious RCU usage. ] kernel test robot
2015-12-18 5:34 ` Herbert Xu
2015-12-18 6:24 ` rhashtable: Kill harmless RCU warning in rhashtable_walk_init Herbert Xu
2015-12-18 12:54 ` Eric Dumazet
2015-12-18 13:14 ` Herbert Xu
2015-12-18 21:27 ` David Miller
2015-12-19 2:45 ` [PATCH v2] " Herbert Xu
2015-12-19 4:42 ` David Miller
2015-12-19 4:47 ` Fengguang Wu [this message]
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=20151219044759.GA15236@wfg-t540p.sh.intel.com \
--to=fengguang.wu@intel.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=netdev@vger.kernel.org \
--cc=ying.huang@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®