]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fou: clean up socket with kfree_rcu
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Tue, 15 Dec 2015 20:01:53 +0000 (21:01 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 03:33:31 +0000 (19:33 -0800)
commit194f548a9f339708c7406cb878551691d2eff865
tree8e1b56e165b9649f5c081303bdfa0a3c99456627
parentdf2613affb993065d67eed9b1261fcfe0f8dbe1a
fou: clean up socket with kfree_rcu

Orabug: 22623887

[ Upstream commit 3036facbb7be3a169e35be3b271162b0fa564a2d ]

fou->udp_offloads is managed by RCU. As it is actually included inside
the fou sockets, we cannot let the memory go out of scope before a grace
period. We either can synchronize_rcu or switch over to kfree_rcu to
manage the sockets. kfree_rcu seems appropriate as it is used by vxlan
and geneve.

Fixes: 23461551c00628c ("fou: Support for foo-over-udp RX path")
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2bc1b5b3a634081d49dbb16aab2b55cec1eb55b9)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
net/ipv4/fou.c