+1
−1
+12
−6
Loading
With concurrent TLB invalidations, completion wait randomly gets timed out because cmd_sem_val was incremented outside the IOMMU spinlock, allowing CMD_COMPL_WAIT commands to be queued out of sequence and breaking the ordering assumption in wait_on_sem(). Move the cmd_sem_val increment under iommu->lock so completion sequence allocation is serialized with command queuing. And remove the unnecessary return. Fixes: d2a0cac1 ("iommu/amd: move wait_on_sem() out of spinlock") Tested-by:Srikanth Aithal <sraithal@amd.com> Reported-by:
Srikanth Aithal <sraithal@amd.com> Signed-off-by:
Ankit Soni <Ankit.Soni@amd.com> Reviewed-by:
Vasant Hegde <vasant.hegde@amd.com> Signed-off-by:
Joerg Roedel <joerg.roedel@amd.com>