aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2015-11-30 12:31:43 +0100
committerDavid S. Miller <davem@davemloft.net>2015-12-02 11:50:59 -0500
commit83e4bf7a7486532df2dc3db27e0e07a250990ed2 (patch)
tree0f299bcb43b700b7bfdab63a998ba4070613a649 /net/openvswitch/vport.c
parentbpf, array: fix heap out-of-bounds access when updating elements (diff)
downloadlinux-dev-83e4bf7a7486532df2dc3db27e0e07a250990ed2.tar.xz
linux-dev-83e4bf7a7486532df2dc3db27e0e07a250990ed2.zip
openvswitch: properly refcount vport-vxlan module
After 614732eaa12d, no refcount is maintained for the vport-vxlan module. This allows the userspace to remove such module while vport-vxlan devices still exist, which leads to later oops. v1 -> v2: - move vport 'owner' initialization in ovs_vport_ops_register() and make such function a macro Fixes: 614732eaa12d ("openvswitch: Use regular VXLAN net_device device") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/openvswitch/vport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index e194c10a1889..31cbc8c5c7db 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -71,7 +71,7 @@ static struct hlist_head *hash_bucket(const struct net *net, const char *name)
return &dev_table[hash & (VPORT_HASH_BUCKETS - 1)];
}
-int ovs_vport_ops_register(struct vport_ops *ops)
+int __ovs_vport_ops_register(struct vport_ops *ops)
{
int err = -EEXIST;
struct vport_ops *o;
@@ -87,7 +87,7 @@ errout:
ovs_unlock();
return err;
}
-EXPORT_SYMBOL_GPL(ovs_vport_ops_register);
+EXPORT_SYMBOL_GPL(__ovs_vport_ops_register);
void ovs_vport_ops_unregister(struct vport_ops *ops)
{