Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9e971a03 authored by Hiroshi DOYU's avatar Hiroshi DOYU Committed by Joerg Roedel
Browse files

iommu/tegra: smmu: Fix unsleepable memory allocation at alloc_pdir()



alloc_pdir() is called from smmu_iommu_domain_init() with spin_lock
held. memory allocations in alloc_pdir() had to be atomic. Instead of
converting into atomic allocation, this patch once releases a lock,
does the allocation, holds the lock again and then sees if it's raced
or not in order to avoid introducing mutex and preallocation.

Signed-off-by: default avatarHiroshi DOYU <hdoyu@nvidia.com>
Reported-by: default avatarChris Wright <chrisw@sous-sol.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 0bdbf4cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment