iommu/iova: Fix tracking of recently failed iova address
If a 32 bit allocation request is too big to possibly succeed, it early exits with a failure and then should never update max32_alloc_ size. This patch fixes current code, now the size is only updated if the slow path failed while walking the tree. Without the fix the allocation may enter the slow path again even if there was a failure before of a request with the same or a smaller size. Cc: <stable@vger.kernel.org> # 4.20+ Fixes: bee60e94 ("iommu/iova: Optimise attempts to allocate iova from 32bit address range") Reviewed-by: NRobin Murphy <robin.murphy@arm.com> Signed-off-by: NRobert Richter <rrichter@marvell.com> Signed-off-by: NJoerg Roedel <jroedel@suse.de>
Showing
想要评论请 注册 或 登录