Skip to content

Commit

Permalink
Merge "Unregister the net device notifier before vhost exit" into R2.…
Browse files Browse the repository at this point in the history
…22.x
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 3, 2016
2 parents a195396 + a90d5a5 commit 3e6db2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions linux/vhost_dev.c
Expand Up @@ -494,7 +494,7 @@ vhost_dellink(struct net_device *dev, struct list_head *head)

vp = netdev_priv(dev);
if (vp) {
if (vp->vp_db_index >= 0)
if (vhost_priv_db && vp->vp_db_index >= 0)
vhost_priv_db[vp->vp_db_index] = NULL;

vp->vp_db_index = -1;
Expand Down Expand Up @@ -566,8 +566,10 @@ void
vhost_exit(void)
{
vhost_netlink_exit();
if (vhost_priv_db)
if (vhost_priv_db) {
kfree(vhost_priv_db);
vhost_priv_db = NULL;
}

return;
}
Expand Down
2 changes: 1 addition & 1 deletion linux/vr_host_interface.c
Expand Up @@ -2339,8 +2339,8 @@ vr_host_vif_init(struct vrouter *router)
void
vr_host_interface_exit(void)
{
vhost_exit();
unregister_netdevice_notifier(&host_if_nb);
vhost_exit();
linux_pkt_dev_free();

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
Expand Down

0 comments on commit 3e6db2e

Please sign in to comment.