]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] pseries: Handle null iommu dma-window property correctly
authorLinas Vepstas <linas@austin.ibm.com>
Tue, 10 Apr 2007 20:11:23 +0000 (06:11 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 2 May 2007 10:04:29 +0000 (20:04 +1000)
commit11d608ed33e9a9962ba8c7599e92867780845e50
treee45e61e0bd0d39b18bef701e6d78e00e7c772bd6
parent382c093d48656136e0e368d8e1200c4e371ec01d
[POWERPC] pseries: Handle null iommu dma-window property correctly

Some versions of pSeries firmware fail to set up a
dma-window property for PCI slots that are unoccupied.
As a result, the loop searching for this propery, in
pci_dma_dev_setup_pSeriesLP(), can run to the end, resulting
in a NULL pointer dereference later in the routine. This
patch prevents the crash, and prints a warning message.

This is theoretically a rare error, as it occurs on what
is hopefully just beta levels of firmware. But just in case
this firmware escapes into the wild, this patch will avoid
the crash.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
arch/powerpc/platforms/pseries/iommu.c