Merge branch 'master' of git://1984.lsi.us.es/nf-next
[~shefty/rdma-dev.git] / net / netfilter / nf_conntrack_helper.c
index c08768da79367ef63fe5c1e434e8d248aa4fddb1..013cdf69fe29a58ed5b360e6bc59b3d80a916489 100644 (file)
@@ -237,7 +237,9 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
                /* We only allow helper re-assignment of the same sort since
                 * we cannot reallocate the helper extension area.
                 */
-               if (help->helper != helper) {
+               struct nf_conntrack_helper *tmp = rcu_dereference(help->helper);
+
+               if (tmp && tmp->help != helper->help) {
                        RCU_INIT_POINTER(help->helper, NULL);
                        goto out;
                }