In the Linux kernel, the following vulnerability has been resolved: iommu/amd: serialize sequence allocation under concurrent TLB invalidations 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.
https://git.kernel.org/stable/c/fca7aa0264ae99e5ff287d0ced5af0b82b121c4f
https://git.kernel.org/stable/c/d51bf43193b1e95dc4e34e540dc76e19def2ae5a
https://git.kernel.org/stable/c/9e249c48412828e807afddc21527eb734dc9bd3d
https://git.kernel.org/stable/c/5000ce7fcb31067566a1a1a2e5b5bbff93625242
https://git.kernel.org/stable/c/48caa7542a795c9679ec1bd1bc2592e05a7369a4