Re: [PATCH v2] iommu: iova: Consolidate code for adding new node to iovad domain rbtree

From: Joerg Roedel
Date: Tue Mar 21 2017 - 09:58:50 EST


On Fri, Feb 24, 2017 at 12:13:37PM +0100, Marek Szyprowski wrote:
> This patch consolidates almost the same code used in iova_insert_rbtree()
> and __alloc_and_insert_iova_range() functions. While touching this code,
> replace BUG() with WARN_ON(1) to avoid taking down the whole system in
> case of corrupted iova tree or incorrect calls.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> ---
> v2:
> - replaced BUG() with WARN_ON(1) as suggested by Robin Murphy
>
> v1:
> - initial version

Applied, thanks.