]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: expect: add to hash table after expect init
authorFlorian Westphal <fw@strlen.de>
Mon, 10 Jul 2017 13:06:39 +0000 (15:06 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 24 Jul 2017 10:20:10 +0000 (12:20 +0200)
commitcde9c67d0967b3e1d998b426e6ce8912b4839609
tree248560469ad38cb17a67be395dad3c590624e724
parentf101e0f97d813a635f558b75019aefc95d3bc2ca
netfilter: expect: add to hash table after expect init

assuming we have lockless readers we should make sure they can only
see expectations that have already been initialized.

hlist_add_head_rcu acts as memory barrier, move it after timer setup.

Theoretically we could crash due to a del_timer() on other cpu
seeing garbage data.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_expect.c