diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-16 22:44:14 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-16 22:44:14 +0200 |
| commit | 1652a83fa494b12e20fc02a2cc3ddbcd75d53170 (patch) | |
| tree | 2aa6461f309916dfadb19ed9e30886f4ece11e39 /drivers/net/hyperv/netvsc_drv.c | |
| parent | d6142b91e9cc249b3aa22c90fade67e2e2d52cdb (diff) | |
| parent | 7876320f88802b22d4e2daf7eb027dd14175a0f8 (diff) | |
| download | linux-next-1652a83fa494b12e20fc02a2cc3ddbcd75d53170.tar.gz linux-next-1652a83fa494b12e20fc02a2cc3ddbcd75d53170.zip | |
Merge 4.19-rc4 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/hyperv/netvsc_drv.c')
| -rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 1121a1ec407c..70921bbe0e28 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -2206,6 +2206,16 @@ static int netvsc_probe(struct hv_device *dev, memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN); + /* We must get rtnl lock before scheduling nvdev->subchan_work, + * otherwise netvsc_subchan_work() can get rtnl lock first and wait + * all subchannels to show up, but that may not happen because + * netvsc_probe() can't get rtnl lock and as a result vmbus_onoffer() + * -> ... -> device_add() -> ... -> __device_attach() can't get + * the device lock, so all the subchannels can't be processed -- + * finally netvsc_subchan_work() hangs for ever. + */ + rtnl_lock(); + if (nvdev->num_chn > 1) schedule_work(&nvdev->subchan_work); @@ -2224,7 +2234,6 @@ static int netvsc_probe(struct hv_device *dev, else net->max_mtu = ETH_DATA_LEN; - rtnl_lock(); ret = register_netdevice(net); if (ret != 0) { pr_err("Unable to register netdev.\n"); |
