iommu/tegra-smmu: Expand mutex protection range
authorNicolin Chen <nicoleotsuka@gmail.com>
Wed, 25 Nov 2020 10:10:10 +0000 (02:10 -0800)
committerWill Deacon <will@kernel.org>
Wed, 25 Nov 2020 11:04:41 +0000 (11:04 +0000)
commitd5f583bf8654c231b781096bc1a186065cda72b3
tree385127dad29fbae9c10111164f6ae043f69aaa1c
parentcf910f61aff3c1c7cac4dc0706811389051c0f98
iommu/tegra-smmu: Expand mutex protection range

This is used to protect potential race condition at use_count.
since probes of client drivers, calling attach_dev(), may run
concurrently.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201125101013.14953-3-nicoleotsuka@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/tegra-smmu.c