Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1295301
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] rhashtable: Kill harmless RCU warning in rhashtable_walk_init |
| Date | 2015-12-19 05:50 +0100 |
| Message-ID | <qHhCV-6U7-3@gated-at.bofh.it> (permalink) |
| References | <qH36X-682-19@gated-at.bofh.it> <qHaL8-2xT-1@gated-at.bofh.it> <qHfKN-5Dg-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
:-)
I fixed this up and applied this, thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [lkp] [rhashtable] f9f51b8070: INFO: suspicious RCU usage. ] Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-18 06:40 +0100
rhashtable: Kill harmless RCU warning in rhashtable_walk_init Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-18 07:30 +0100
Re: rhashtable: Kill harmless RCU warning in rhashtable_walk_init Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-18 14:00 +0100
Re: rhashtable: Kill harmless RCU warning in rhashtable_walk_init Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-18 14:20 +0100
Re: rhashtable: Kill harmless RCU warning in rhashtable_walk_init David Miller <davem@davemloft.net> - 2015-12-18 22:30 +0100
[PATCH v2] rhashtable: Kill harmless RCU warning in rhashtable_walk_init Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-19 03:50 +0100
Re: [LKP] [PATCH v2] rhashtable: Kill harmless RCU warning in rhashtable_walk_init Fengguang Wu <fengguang.wu@intel.com> - 2015-12-19 05:50 +0100
Re: [PATCH v2] rhashtable: Kill harmless RCU warning in rhashtable_walk_init David Miller <davem@davemloft.net> - 2015-12-19 05:50 +0100
csiph-web