ct: will ct be stalled in rcu read critical section?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



in http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commitdiff;h=ea781f197d6a835cbb93a0bf88ee1696296ed8aa#patch6
, I don't understand the patch bellow.

@@ -275,11 +291,18 @@ nf_conntrack_find_get(struct net *net, const
struct nf_conntrack_tuple *tuple)
        struct nf_conn *ct;

        rcu_read_lock();
+begin:
        h = __nf_conntrack_find(net, tuple);
        if (h) {
                ct = nf_ct_tuplehash_to_ctrack(h);
                if (unlikely(!atomic_inc_not_zero(&ct->ct_general.use)))
                        h = NULL;
+               else {
+                       if (unlikely(!nf_ct_tuple_equal(tuple, &h->tuple))) {
+                               nf_ct_put(ct);
+                               goto begin;
+                       }
+               }
        }
        rcu_read_unlock();

will ct be stalled in rcu read critical section?

Would you explain it for me? Thanks!

-- 
Regards,
Changli Gao(xiaosuo@xxxxxxxxx)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux