[PATCH] drm/etnaviv: remove BUG_ON in MMU unmap path

Lucas Stach l.stach at pengutronix.de
Thu Apr 28 14:04:58 UTC 2016


Am Donnerstag, den 28.04.2016, 14:55 +0100 schrieb Russell King - ARM
Linux:
> On Wed, Apr 27, 2016 at 02:38:18PM +0200, Lucas Stach wrote:
> > If the MMU map fails caused by an unaligned SG entry, the unmap path
> > is called to undo all already setup SG mappings. When encountering the
> > unaligned SG the unmap path hangs the kernel with a BUG(), while the
> > error is recoverable by just failing the submit that references the
> > faulty object.
> 
> I'm very tempted to NAK this, because I introduced it with good reason:
> we should never see anything except a page-aligned number of bytes here.
> 
> Are you seeing this trigger?
> 
I've only seen this once and I don't know what caused it really. Maybe
some unrelated corruption.

The observation was that the common code in iommu_map() rightfully
rejected to map things, as mapping something unaligned to the page size
is totally bogus. iommu_unmap will detect this condition in the same
way. So without this BUG_ON() the kernel would have been able to recover
from the bogus input data (maybe allowing to debug things further), but
with the BUG_ON() in place it just dies.

Regards,
Lucas



More information about the dri-devel mailing list