]> git.baikalelectronics.ru Git - kernel.git/commit
net: vxlan: properly cleanup devs on module unload
authorDaniel Borkmann <dborkman@redhat.com>
Mon, 13 Jan 2014 17:41:20 +0000 (18:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jan 2014 07:38:39 +0000 (23:38 -0800)
commitcc3c9422d9bc6413d05b51159dc304e925a34bc0
tree601cab1761c36f24798e4b168595534f5feacb5d
parent4dd8ffca1ef9b0762da3e79e57f2ddf5942c8467
net: vxlan: properly cleanup devs on module unload

We should use vxlan_dellink() handler in vxlan_exit_net(), since
i) we're not in fast-path and we should be consistent in dismantle
just as we would remove a device through rtnl ops, and more
importantly, ii) in case future code will kfree() memory in
vxlan_dellink(), we would leak it right here unnoticed. Therefore,
do not only half of the cleanup work, but make it properly.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c