]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/iommu-common.c: do not try to deref a null iommu->lazy_flush() pointer when n...
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Tue, 22 Sep 2015 21:59:20 +0000 (14:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:15 +0000 (14:43 -0700)
commit455a35d039d0a84d021721cdde2384ec36c0b6e0
treee36dcac9af425b64420b7eeef08098b98ab17e2b
parent9a36019b8e0a6064614e6227d26c144e88c635ea
lib/iommu-common.c: do not try to deref a null iommu->lazy_flush() pointer when n < pool->hint

commit d046b770c9fc36ccb19c27afdb8322220108cbc7 upstream.

The check for invoking iommu->lazy_flush() from iommu_tbl_range_alloc()
has to be refactored so that we only call ->lazy_flush() if it is
non-null.

I had a sparc kernel that was crashing when I was trying to process some
very large perf.data files- the crash happens when the scsi driver calls
into dma_4v_map_sg and thus the iommu_tbl_range_alloc().

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/iommu-common.c