OSDN Git Service

iommu/debug: Add mutex to make attach/detach thread safe
authorVivek Gautam <vivek.gautam@codeaurora.org>
Fri, 22 Jun 2018 14:23:31 +0000 (19:53 +0530)
committerVivek Gautam <vivek.gautam@codeaurora.org>
Mon, 9 Jul 2018 18:06:34 +0000 (23:36 +0530)
commit580b853d7353105a26df89219368cadc468bc920
tree36272df1e36590d3595d23ae7f3d6893d1140d1f
parent83ddc388e259600bc77a706e4e1cc93dc3e7e97f
iommu/debug: Add mutex to make attach/detach thread safe

This mutex lock will help to synchronise the usage of iommu domain
structure which is getting used by multiple threads to perform
iommu attach and iommu detach in case of any error.

Without this change we are seeing page poisoning - write after free
when running stress tests using iommu-debug test cases.

Change-Id: I1033808a510786577c41201c2a6a330e5465d4d1
Acked-by: Ankur Saxena <c_ankusa@qti.qualcomm.com>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
drivers/iommu/iommu-debug.c