summaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorRoss Lagerwall <ross.lagerwall@citrix.com>2018-06-21 14:00:20 +0100
committerDavid S. Miller <davem@davemloft.net>2018-06-22 07:54:54 +0900
commitcb257783c2927b73614b20f915a91ff78aa6f3e8 (patch)
treed6dbad27461e6d9e9ea045580fcacf4df4488df8 /drivers/net/xen-netfront.c
parent44a5cd436ec067c9a62988aca3331ac6eee5268d (diff)
downloadlinux-cb257783c2927b73614b20f915a91ff78aa6f3e8.tar.gz
linux-cb257783c2927b73614b20f915a91ff78aa6f3e8.tar.bz2
linux-cb257783c2927b73614b20f915a91ff78aa6f3e8.zip
xen-netfront: Fix mismatched rtnl_unlock
Fixes: f599c64fdf7d ("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>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 922ce0abf5cf..ee4cb6cfde1e 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -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();
@@ -1925,6 +1925,7 @@ abort_transaction_no_dev_fatal:
xennet_destroy_queues(info);
out:
rtnl_unlock();
+out_unlocked:
device_unregister(&dev->dev);
return err;
}