Re: [PATCH] sadump: two bugfix patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 51f3049f4cb4df3a7fe9dbe21eca8a194ef377dc Mon Sep 17 00:00:00 2001
From: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx>
Date: Fri, 16 Oct 2015 16:19:19 +0900
Subject: [PATCH 2/2] sadump, bugfix: fix behavior of --zero_excluded option on
 sadump formats

Currently, behavior of --zero_excluded option on sadump formats is
converse: crash utility succeeds in reading pages that are filtered
out by default and fails if --zero_excluded option is specified. This
is due to a mistake of checking if ZERO_EXCLUDED flag. This commit
corrects the check and so the wrong behavior of --zero_excluded
option.

Signed-off-by: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx>
---
 sadump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sadump.c b/sadump.c
index 6f87a23..3b53ac5 100644
--- a/sadump.c
+++ b/sadump.c
@@ -790,7 +790,7 @@ int read_sadump(int fd, void *bufptr, int cnt, ulong addr, physaddr_t paddr)
 	if ((pfn >= sd->max_mapnr) || !page_is_ram(pfn))
 		return SEEK_ERROR;
 	if (!page_is_dumpable(pfn)) {
-		if (sd->flags & SADUMP_ZERO_EXCLUDED)
+		if (!(sd->flags & SADUMP_ZERO_EXCLUDED))
 			return PAGE_EXCLUDED;
 		memset(bufptr, 0, cnt);
 		return cnt;
-- 
1.9.3

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux