RDMA/usnic: use iommu_map_atomic() under spin_lock()
authorYang Yingliang <yangyingliang@huawei.com>
Sun, 29 Jan 2023 09:37:57 +0000 (17:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:17:58 +0000 (19:17 +0100)
commit6fe1ad42afa8e8e98b43a9a72d6cd2a19a5d5eea
treee395b2defb1fc5aeae6866647d47dc8b8117d7b1
parent8f5fe1cd8e6a97f94840b55f59ed08cbc397086f
RDMA/usnic: use iommu_map_atomic() under spin_lock()

[ Upstream commit b7e08a5a63a11627601915473c3b569c1f6c6c06 ]

usnic_uiom_map_sorted_intervals() is called under spin_lock(), iommu_map()
might sleep, use iommu_map_atomic() to avoid potential sleep in atomic
context.

Fixes: e3cf00d0a87f ("IB/usnic: Add Cisco VIC low-level hardware driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230129093757.637354-1-yangyingliang@huawei.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/usnic/usnic_uiom.c