From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by kanga.kvack.org (Postfix) with ESMTP id 933EB6B0039 for ; Thu, 25 Sep 2014 16:33:59 -0400 (EDT) Received: by mail-pd0-f172.google.com with SMTP id fp1so1822021pdb.17 for ; Thu, 25 Sep 2014 13:33:59 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com. [192.55.52.93]) by mx.google.com with ESMTP id ge5si5854697pbc.3.2014.09.25.13.33.58 for ; Thu, 25 Sep 2014 13:33:58 -0700 (PDT) From: Matthew Wilcox Subject: [PATCH v11 01/21] axonram: Fix bug in direct_access Date: Thu, 25 Sep 2014 16:33:18 -0400 Message-Id: <1411677218-29146-2-git-send-email-matthew.r.wilcox@intel.com> In-Reply-To: <1411677218-29146-1-git-send-email-matthew.r.wilcox@intel.com> References: <1411677218-29146-1-git-send-email-matthew.r.wilcox@intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox The 'pfn' returned by axonram was completely bogus, and has been since 2008. Signed-off-by: Matthew Wilcox Reviewed-by: Jan Kara --- arch/powerpc/sysdev/axonram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 47b6b9f..830edc8 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c @@ -156,7 +156,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector, } *kaddr = (void *)(bank->ph_addr + offset); - *pfn = virt_to_phys(kaddr) >> PAGE_SHIFT; + *pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT; return 0; } -- 2.1.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org