Skip to content

Commit

Permalink
If a compressed kdump is damaged/truncated such that the bitmap data
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Dave Anderson committed Jun 27, 2014
1 parent 5094787 commit 1767e9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diskdump.c
Expand Up @@ -618,7 +618,7 @@ read_dump_header(char *file)
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");
Expand Down

0 comments on commit 1767e9d

Please sign in to comment.