]> 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>
Fri, 18 Sep 2015 11:49:50 +0000 (17:19 +0530)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 25 Sep 2015 16:41:41 +0000 (09:41 -0700)
commit4d16d5529b8e0e7afff8d5e6f1753c23d4e1fd30
treecf7c09c3baab6e08a4970d36c5e63ac6a298aa1d
parente7fdc0242c14b7af86c9d5e83bff420d1a73c6d3
lib/iommu-common.c: do not try to deref a null iommu->lazy_flush() pointer when n < pool->hint

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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 02fa305981f7e2934173604f22789918cdaa6e3b)
(cherry picked from commit ca2de477dfdcfa0a1f32f95a701e81467438d3f4)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
lib/iommu-common.c