]> granicus.if.org Git - ipset/commit
netfilter: ipset: pernet ops must be unregistered last
authorFlorian Westphal <fw@strlen.de>
Tue, 26 Sep 2017 17:52:58 +0000 (19:52 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 26 Sep 2017 17:52:58 +0000 (19:52 +0200)
commita8d545d85e8aeaa420051a7c1d504a72d455e077
tree326e0c6253133bc72c46c7a156d24e6ea00a7143
parenta4212bf911026740afc7fce98d9100e2ef5dcea0
netfilter: ipset: pernet ops must be unregistered last

Removing the ipset module leaves a small window where one cpu performs
module removal while another runs a command like 'ipset flush'.

ipset uses net_generic(), unregistering the pernet ops frees this
storage area.

Fix it by first removing the user-visible api handlers and the pernet
ops last.

Fixes: 1785e8f473082 ("netfiler: ipset: Add net namespace for ipset")
Reported-by: Li Shuang <shuali@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_core.c