linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] percpu: fixes for v3.2-rc6
@ 2011-12-19 17:29 Tejun Heo
  0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2011-12-19 17:29 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Eugene Surovegin, Petr Tesarik

Hello, Linus.

per_cpu_ptr_to_phys() had another silly bug where it chopped off page
offset of translated addresses if they are in vmalloc area, which of
course makes kdump quite unhappy.

Please pull from the following branch to receive the fix.

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git for-3.2-fixes

Thanks.

Eugene Surovegin (1):
      percpu: fix per_cpu_ptr_to_phys() handling of non-page-aligned addresses

 mm/percpu.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/mm/percpu.c b/mm/percpu.c
index 3bb810a..716eb4a 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1023,9 +1023,11 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr)
 		if (!is_vmalloc_addr(addr))
 			return __pa(addr);
 		else
-			return page_to_phys(vmalloc_to_page(addr));
+			return page_to_phys(vmalloc_to_page(addr)) +
+			       offset_in_page(addr);
 	} else
-		return page_to_phys(pcpu_addr_to_page(addr));
+		return page_to_phys(pcpu_addr_to_page(addr)) +
+		       offset_in_page(addr);
 }
 
 /**

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-19 17:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-19 17:29 [GIT PULL] percpu: fixes for v3.2-rc6 Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).