netfilter: nf_conntrack_proto: fix warning with CONFIG_PROVE_RCU
[deliverable/linux.git] / net / netfilter / nf_conntrack_proto.c
index a6defc7936014df69e3b0cc4d70682873b2b9487..5886ba1d52a0c353a2538313c717328cacfdcac3 100644 (file)
@@ -117,9 +117,13 @@ void nf_ct_l3proto_module_put(unsigned short l3proto)
 {
        struct nf_conntrack_l3proto *p;
 
-       /* rcu_read_lock not necessary since the caller holds a reference */
+       /* rcu_read_lock not necessary since the caller holds a reference, but
+        * taken anyways to avoid lockdep warnings in __nf_ct_l3proto_find()
+        */
+       rcu_read_lock();
        p = __nf_ct_l3proto_find(l3proto);
        module_put(p->me);
+       rcu_read_unlock();
 }
 EXPORT_SYMBOL_GPL(nf_ct_l3proto_module_put);
 
This page took 0.026089 seconds and 5 git commands to generate.