iommu/amd: Fix sleeping in atomic context
authorVasant Hegde <vasant.hegde@amd.com>
Thu, 7 Mar 2024 05:27:38 +0000 (05:27 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 8 Mar 2024 07:58:24 +0000 (08:58 +0100)
commita0c8bf0a474eea8ee2590332a1ebdec6048ce40c
tree5445b2416c08784f31b149aef32abd0eb89d53e7
parent0feda94c868d396fac3b3cb14089d2d989a07c72
iommu/amd: Fix sleeping in atomic context

Commit cf70873e3d01 ("iommu/amd: Refactor GCR3 table helper functions")
changed GFP flag we use for GCR3 table. Original plan was to move GCR3
table allocation outside spinlock. But this requires complete rework of
attach device path. Hence we didn't do it as part of SVA series. For now
revert the GFP flag to ATOMIC (same as original code).

Fixes: cf70873e3d01 ("iommu/amd: Refactor GCR3 table helper functions")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20240307052738.116035-1-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c