[PATCH] makedumpfile: Use file offset in initialize_mmap()

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

 



Hi all,

update_mmap_range() expects a file offset as its first argument, but
initialize_mmap() passes a physical address. Since the first segment
usually starts at physical addr 0 on S/390, but there is no segment 
at file offset 0, update_mmap_range() fails, and makedumpfile falls
back to read().

@Michael: I wonder how you actually tested the kernel mmap patches;
this bug has prevented mmap on all my s390 systems...

Signed-off-by: Petr Tesarik <ptesarik at suse.cz>

---
 makedumpfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -347,7 +347,7 @@ initialize_mmap(void) {
 	info->mmap_buf = MAP_FAILED;
 
 	get_pt_load(0, &phys_start, NULL, NULL, NULL);
-	if (!update_mmap_range(phys_start, 1))
+	if (!update_mmap_range(paddr_to_offset(phys_start), 1))
 		return FALSE;
 
 	return TRUE;



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux