[PATCH] kdump: don't call __ioremap() for pfn = 0

Sachin P. Sant sachinp at in.ibm.com
Thu Sep 21 14:37:02 EST 2006


Hi

While using dd command to retrive the dump from /dev/oldmem, there comes
a rare case where pfn value is zero. In this case the __ioremap() call 
returns
NULL and hence copying fails.

# dd if=/dev/oldmem of=/dev/null
dd: reading `/dev/oldmem': Bad address
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000121 seconds, 0.0 kB/s

Attached is a patch to fix this problem. During such rare cases don't call
__ioremap() to do the address translation, instead use __va() .

Tested with 2.6.18.

Thanks
-Sachin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kdump-no-ioremap-for-pfn-zero-fix
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060921/60b6bfc6/attachment.txt>


More information about the Linuxppc-dev mailing list