]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Dec 2015 00:03:02 +0000 (19:03 -0500)
commitd22866222c9d8562b2aabe2b80b57db5a751ebdb
treeff2025b940b458bed6abce9963f980710f3ef93c
parentf0e980770c0f2f39f75a26b31f8e213b6c6baccd
fou: clean up socket with kfree_rcu

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: 3045cb8aee2af51 ("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>
net/ipv4/fou.c