Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1230313

Re: [PATCH] lib: fix data race in rhashtable_rehash_one

From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH] lib: fix data race in rhashtable_rehash_one
Date 2015-09-22 17:20 +0200
Message-ID <qbxwm-DB-33@gated-at.bofh.it> (permalink)
References <qbinD-4dy-5@gated-at.bofh.it>
Organization Core

Show all headers | View raw


Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> What I said is :
> 
> In @head you already have the correct nulls value, from hash table.
> 
> You do not need to recompute this value, and/or test if hash table chain
> is empty.
> 
> If hash bucket is empty, it contains the appropriate NULLS value.
> 
> If you are paranoiac add this debugging check :
> 
> if (rht_is_a_nulls(head))
>    BUG_ON(head != (struct rhash_head *)rht_marker(ht, new_hash));
> 
> 
> Therefore, simply fix the bug and unnecessary code with :

Ack.  I remember seeing this when I was working on it but never
got around to removing this bogosity.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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 | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] lib: fix data race in rhashtable_rehash_one Dmitry Vyukov <dvyukov@google.com> - 2015-09-21 10:10 +0200
  Re: [PATCH] lib: fix data race in rhashtable_rehash_one Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-21 15:40 +0200
    Re: [PATCH] lib: fix data race in rhashtable_rehash_one Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-21 17:00 +0200
      Re: [PATCH] lib: fix data race in rhashtable_rehash_one Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-21 17:20 +0200
      Re: [PATCH] lib: fix data race in rhashtable_rehash_one Dmitry Vyukov <dvyukov@google.com> - 2015-09-21 17:20 +0200
      Re: [PATCH] lib: fix data race in rhashtable_rehash_one Thomas Graf <tgraf@suug.ch> - 2015-09-22 00:30 +0200
        Re: [PATCH] lib: fix data race in rhashtable_rehash_one Eric Dumazet <eric.dumazet@gmail.com> - 2015-09-22 01:10 +0200
          Re: [PATCH] lib: fix data race in rhashtable_rehash_one Thomas Graf <tgraf@suug.ch> - 2015-09-22 10:30 +0200
            Re: [PATCH] lib: fix data race in rhashtable_rehash_one Dmitry Vyukov <dvyukov@google.com> - 2015-09-22 11:00 +0200
          Re: [PATCH] lib: fix data race in rhashtable_rehash_one Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-22 17:20 +0200

csiph-web