aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/netfilter/nf_conntrack_core.c12
-rw-r--r--net/netfilter/nf_conntrack_l3proto_generic.c1
2 files changed, 4 insertions, 9 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index e581190fb6c3..e3022226a408 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -208,10 +208,8 @@ nf_ct_proto_find_get(u_int16_t l3proto, u_int8_t protocol)
208 208
209 preempt_disable(); 209 preempt_disable();
210 p = __nf_ct_proto_find(l3proto, protocol); 210 p = __nf_ct_proto_find(l3proto, protocol);
211 if (p) { 211 if (!try_module_get(p->me))
212 if (!try_module_get(p->me)) 212 p = &nf_conntrack_generic_protocol;
213 p = &nf_conntrack_generic_protocol;
214 }
215 preempt_enable(); 213 preempt_enable();
216 214
217 return p; 215 return p;
@@ -229,10 +227,8 @@ nf_ct_l3proto_find_get(u_int16_t l3proto)
229 227
230 preempt_disable(); 228 preempt_disable();
231 p = __nf_ct_l3proto_find(l3proto); 229 p = __nf_ct_l3proto_find(l3proto);
232 if (p) { 230 if (!try_module_get(p->me))
233 if (!try_module_get(p->me)) 231 p = &nf_conntrack_generic_l3proto;
234 p = &nf_conntrack_generic_l3proto;
235 }
236 preempt_enable(); 232 preempt_enable();
237 233
238 return p; 234 return p;
diff --git a/net/netfilter/nf_conntrack_l3proto_generic.c b/net/netfilter/nf_conntrack_l3proto_generic.c
index 7de4f06c63c5..3fc58e454d4e 100644
--- a/net/netfilter/nf_conntrack_l3proto_generic.c
+++ b/net/netfilter/nf_conntrack_l3proto_generic.c
@@ -94,5 +94,4 @@ struct nf_conntrack_l3proto nf_conntrack_generic_l3proto = {
94 .print_conntrack = generic_print_conntrack, 94 .print_conntrack = generic_print_conntrack,
95 .prepare = generic_prepare, 95 .prepare = generic_prepare,
96 .get_features = generic_get_features, 96 .get_features = generic_get_features,
97 .me = THIS_MODULE,
98}; 97};