]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix error handling in netvsc_attach()
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 30 Oct 2019 15:32:13 +0000 (15:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 01:17:36 +0000 (18:17 -0700)
commit170119ce8f880099f91eaa8b18a7b230ee9849cc
treef08ae7bc835932ecc0392bb56b16af8663ecde00
parentcbc56d2921d8428bafddfc653965e706cd717a29
hv_netvsc: Fix error handling in netvsc_attach()

If rndis_filter_open() fails, we need to remove the rndis device created
in earlier steps, before returning an error code. Otherwise, the retry of
netvsc_attach() from its callers will fail and hang.

Fixes: 467e8847a1ac ("hv_netvsc: common detach logic")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c