This patch intend to fix a segmentation fault when pfn exceeds 2G boundary.
In function is_on(), if the pfn (i) is greater than 2G, it will be a negative
value and will cause a segmentation fault.
is_on(char *bitmap, int i)
{
return bitmap[i>>3] & (1 << (i & 7));
}
Signed-off-by: Jingbai Ma <[email protected]>
---
makedumpfile.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/makedumpfile.h b/makedumpfile.h
index 3d270c6..03d35a8 100644
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -1591,7 +1591,7 @@ int get_xen_info_ia64(void);
#endif /* s390x */
static inline int
-is_on(char *bitmap, int i)
+is_on(char *bitmap, unsigned long long i)
{
return bitmap[i>>3] & (1 << (i & 7));
}
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec