]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:58:05 +0000 (13:58 +0200)
commit23587481ef1ba41b71b0f83e903dbbd95123670f
tree75a7edd4facae27dbc54df28db415e96609e3f78
parent074773148ebacdeca107a449abe608b1117d6434
Netvsc: Call hv_unmap_memory() in the netvsc_device_remove()

[ Upstream commit b539324f6fe798bdb186e4e91eafb37dd851db2a ]

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: 846da38de0e8 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/hyperv/netvsc.c