Patrick McHardy wrote: > Pablo Neira Ayuso wrote: >> This patch moves the assignation of the master conntrack to >> ctnetlink_create_conntrack(), which is where it really belongs. >> This patch is a cleanup. > > Applied, thanks. I've added this patch on top to fix a RCU context imbalance. This seems like a good opportunity to say this again: please (everyone) compile your code using sparse. It catches this type and more bugs. There is a second bug introduced by this patch: add_timer(&ct->timeout); nf_conntrack_hash_insert(ct); rcu_read_unlock(); return ct; The conntrack lock is not held, it might crash or create double entries.