Re: [PATCH v2] iommu/iova: Fix tracking of recently failed iova address

From: Joerg Roedel
Date: Fri Mar 22 2019 - 05:31:52 EST


On Wed, Mar 20, 2019 at 06:57:23PM +0000, Robert Richter wrote:
> From: Robert Richter <rrichter@xxxxxxxxxxx>
> Subject: [PATCH v2] iommu/iova: Fix tracking of recently failed iova address
> size
>
> 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@xxxxxxxxxxxxxxx> # 4.20+
> Fixes: bee60e94a1e2 ("iommu/iova: Optimise attempts to allocate iova from 32bit address range")
> Signed-off-by: Robert Richter <rrichter@xxxxxxxxxxx>
> Reviewed-by: Robin Murphy <robin.murphy@xxxxxxx>
> Signed-off-by: Robert Richter <rrichter@xxxxxxxxxxx>
> ---
> drivers/iommu/iova.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.