Skip to content

Commit

Permalink
xen-netfront: Fix mismatched rtnl_unlock
Browse files Browse the repository at this point in the history
Fixes: f599c64 ("xen-netfront: Fix race between device setup and open")
Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ross Lagerwall authored and David S. Miller committed Jun 21, 2018
1 parent 44a5cd4 commit cb25778
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,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();
Expand Down Expand Up @@ -1925,6 +1925,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;
}
Expand Down

0 comments on commit cb25778

Please sign in to comment.