If a compressed kdump is damaged/truncated such that the bitmap data

in the dumpfile header is not contained within the file, attempts
to analyze it with a vmlinux file, or using the "crash --osrelease"
or "crash --log" options with just the vmcore, will result in the
crash utility spinning forever, endlessly performing reads of 0 bytes
from the file without recognizing the EOF condition.
(dwysocha@redhat.com)
This commit is contained in:
Dave Anderson 2014-06-27 14:37:15 -04:00
parent 5094787767
commit 1767e9d4f7

View File

@ -618,7 +618,7 @@ restart:
len = bitmap_len;
while (len) {
bytes_read = read(dd->dfd, bufptr, len);
if (bytes_read < 0) {
if (bytes_read <= 0) {
error(INFO, "%s: cannot read memory bitmap\n",
DISKDUMP_VALID() ? "diskdump"
: "compressed kdump");