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:11:43 +0000 (19:11 +0100)
commitd53903cc2396e0c18ab5e60f47f7cf7c10f5e492
tree40a6e10738e1923f063829837102ed3cef816f09
parent360682fe7df262d94fae54f737c487bec0f9190d
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