public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* xt_hashlimit.c race?
@ 2012-09-18 13:22 "Oleg A. Arkhangelsky"
  2012-09-18 14:26 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: "Oleg A. Arkhangelsky" @ 2012-09-18 13:22 UTC (permalink / raw)
  To: netdev

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-18 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-18 13:22 xt_hashlimit.c race? "Oleg A. Arkhangelsky"
2012-09-18 14:26 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox