]> git.baikalelectronics.ru Git - kernel.git/commit
Netvsc: Call hv_unmap_memory() in the netvsc_device_remove()
authorTianyu Lan <Tianyu.Lan@microsoft.com>
Tue, 8 Feb 2022 14:26:52 +0000 (09:26 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 11:54:05 +0000 (11:54 +0000)
commite2e572e92757a6171ecee4f0e363eb7b28b5566f
tree61f3edc3f98447e276b670d0316ce547d13c3152
parentec380b5fd6a64935fbdcb83d79847baa067950c6
Netvsc: Call hv_unmap_memory() in the netvsc_device_remove()

netvsc_device_remove() calls vunmap() inside which should not be
called in the interrupt context. Current code calls hv_unmap_memory()
in the free_netvsc_device() which is rcu callback and maybe called
in the interrupt context. This will trigger BUG_ON(in_interrupt())
in the vunmap(). Fix it via moving hv_unmap_memory() to netvsc_device_
remove().

Fixes: ee6f45192cf0 ("net: netvsc: Add Isolation VM support for netvsc driver")
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c