aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-09-11 01:36:09 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-09-11 02:01:15 -0400
commit1d6ed32226326a6e6cd67cd9ee4294bcbb0c9a15 (patch)
tree0baedebba58eb55661ac7a39027e48576652424a /arch/powerpc
parentbc00351edd5c1b84d48c3fdca740fedfce4ae6ce (diff)
powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline
That code uses dma_mapping_error() with a NULL device, which is a bad idea :-) The proper fix might be to start using some kind of pseudo device for all these low level mappings with the hypervisor but that will be for another day. Since it directly calls into the low level iommu code, I see no problem in having it directly test against DMA_ERROR_CODE instead of using the accessors with a NULL argument for now. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/iseries/mf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index fef4d5150517..0d9343df35bc 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -872,7 +872,7 @@ static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
872 count = 256 - off; 872 count = 256 - off;
873 873
874 dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE); 874 dma_addr = iseries_hv_map(page, off + count, DMA_FROM_DEVICE);
875 if (dma_mapping_error(NULL, dma_addr)) 875 if (dma_addr == DMA_ERROR_CODE)
876 return -ENOMEM; 876 return -ENOMEM;
877 memset(page, 0, off + count); 877 memset(page, 0, off + count);
878 memset(&vsp_cmd, 0, sizeof(vsp_cmd)); 878 memset(&vsp_cmd, 0, sizeof(vsp_cmd));