Skip to content

netfilter: conntrack: free extension area immediately

Florian Westphal netfilter-devel 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v11 patch 4 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2netfilter: ctnetlink: don't dump ct extensions of unconfirmed conntracksnet/netfilter/nf_conntrack_netlink.c+50 -260 replies
2/2netfilter: conntrack: free extension area immediatelyinclude/net/netfilter/nf_conntrack_extend.h net/netfilter/nf_conntrack_core.c net/netfilter/nf_conntrack_extend.c+10 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 nf-next 0/2] netfilter: conntrack: free extension area immediately

conntrack extensions are free'd via kfree_rcu, but there appears to be no need for this anymore.

Lookup doesn't access ct->ext. All other accesses i found occur after taking either the hash bucket lock, the dying list lock, or a ct reference count.

Only exception was ctnetlink, where we could potentially see a ct->ext that is about to be free'd via krealloc on other cpu. Since that only affects unconfirmed conntracks, just skip dumping extensions for those.