Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote: > On Fri, 2016-08-19 at 13:36 +0200, Florian Westphal wrote: > > Conntrack gc worker to evict stale entries. > > ... > > > + > > + hlist_nulls_for_each_entry_rcu(h, n, &ct_hash[i], hnnode) { > > + tmp = nf_ct_tuplehash_to_ctrack(h); > > + > > + if (nf_ct_is_expired(tmp)) { > > + nf_ct_gc_expired(tmp); > > + expired_count++; > > + continue; > > Same remark about hlist_nulls_for_each_entry_rcu() not 'safe' here Hmm, I am missing something, I will wait for your answer on my previous reply ... I though this was safe due to rcu -- another cpu could evict entry as well so we can always see 'free'd objects with refcnt 0. (nf_ct_gc_expired() skips those to avoid double-free). > > + rcu_read_unlock(); > > + cond_resched(); > > This could use cond_resched_rcu_qs() Indeed, I did not kown about this, nice! Will add it in V2, thanks! -- 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