drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem
authorLucas Stach <l.stach@pengutronix.de>
Wed, 23 Mar 2022 16:08:22 +0000 (17:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:24 +0000 (10:23 +0200)
commit03bd455a79f69d97fee3e3b212ab754442f10e5c
tree424b2a46704a7e3f85026ae56834d40de7ff5d03
parent6e842e680bf0d7533d7c3115c9c71e3541ddb749
drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem

commit e168c25526cd0368af098095c2ded4a008007e1b upstream.

When the mapping is already reaped the unmap must be a no-op, as we
would otherwise try to remove the mapping twice, corrupting the involved
data structures.

Cc: stable@vger.kernel.org # 5.4
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/etnaviv/etnaviv_mmu.c