From: "\"Oleg A. Arkhangelsky\"" <sysoleg@yandex.ru>
To: netdev@vger.kernel.org
Subject: xt_hashlimit.c race?
Date: Tue, 18 Sep 2012 17:22:15 +0400 [thread overview]
Message-ID: <20201347974535@web11g.yandex.ru> (raw)
Hello,
Looking at the net/netfilter/xt_hashlimit.c revealed one question. As far as
I can understand hashlimit_mt() code under rcu_read_lock_bh() can be
executed simultaneously by more than one CPU. So what if we have two
packets with the same new dst value that processed in parallel by different
CPUs? In both cases dh is NULL and both CPUs tries to create new
entry in hash table. This is not what we want and can lead to undefined
behavior in the future.
Or maybe I'm wrong? Could anyone tell me is this situation possible?
Thank you!
--
wbr, Oleg.
next reply other threads:[~2012-09-18 13:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 13:22 "Oleg A. Arkhangelsky" [this message]
2012-09-18 14:26 ` xt_hashlimit.c race? Eric Dumazet
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=20201347974535@web11g.yandex.ru \
--to=sysoleg@yandex.ru \
--cc=netdev@vger.kernel.org \
/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