From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [PATCH 16/33] netns ct: per-netns event cache Date: Tue, 09 Sep 2008 08:12:27 +0200 Message-ID: <48C613CB.5000303@trash.net> References: <48C01046.2070704@trash.net> <1220842990-30500-16-git-send-email-adobriyan@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alexey Dobriyan Return-path: In-Reply-To: <1220842990-30500-16-git-send-email-adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: netdev.vger.kernel.org Alexey Dobriyan wrote: > Heh, last minute proof-reading of this patch made me think, > that this is actually unneeded, simply because "ct" pointers will be > different for different conntracks in different netns, just like they > are different in one netns. > > Not so sure anymore. Its necessary because the cache needs to be flushed on netns exit and this is only allowed while its not in use anymore. I don't see anything in this series actually making sure nothing hits the cache on exit though. Am I missing something? Additionally (I might have missed a following patch moving it out though) this doesn't belong in the netns exit path: void nf_conntrack_cleanup(struct net *net) { rcu_assign_pointer(ip_ct_attach, NULL); ... rcu_assign_pointer(nf_ct_destroy, NULL);