Commit 758c6263 authored by Ross Lagerwall's avatar Ross Lagerwall Committed by Stefan Bader

xen-netfront: Fix mismatched rtnl_unlock

Fixes: f599c64f ("xen-netfront: Fix race between device setup and open")
Reported-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarRoss Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>

BugLink: https://bugs.launchpad.net/bugs/1781413

(cherry picked from commit cb257783)
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKhaled Elmously <khalid.elmously@canonical.com>
Acked-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 2fee7ad4
......@@ -1821,7 +1821,7 @@ static int talk_to_netback(struct xenbus_device *dev,
err = xen_net_read_mac(dev, info->netdev->dev_addr);
if (err) {
xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
goto out;
goto out_unlocked;
}
rtnl_lock();
......@@ -1936,6 +1936,7 @@ static int talk_to_netback(struct xenbus_device *dev,
xennet_destroy_queues(info);
out:
rtnl_unlock();
out_unlocked:
device_unregister(&dev->dev);
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment