]> git.baikalelectronics.ru Git - kernel.git/commit
drm/etnaviv: fix dumping of iommuv2
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 25 Oct 2019 10:39:10 +0000 (12:39 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Tue, 29 Oct 2019 17:12:24 +0000 (18:12 +0100)
commit3128af83e4551e844d4cad9c8b71c649be09a22a
tree09e9a62fce1e211c12d56e559ba46a8f581dd9e3
parented82c0226554359c6baffbbf3952d625f2f4acf5
drm/etnaviv: fix dumping of iommuv2

etnaviv_iommuv2_dump_size(..) returns the number of PTE * SZ_4K but
etnaviv_iommuv2_dump(..) increments buf pointer even if there is no PTE.
This results in a bad buf pointer which gets used for memcpy(..), when
copying the MMU state in the coredump buffer.

Fixes: 538ddf87d770 ("drm/etnaviv: implement IOMMUv2 translation")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c