stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "arm64: mm: avoid name clash in __page_to_voff()" has been added to the 4.9-stable tree
@ 2017-01-23 16:02 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-23 16:02 UTC (permalink / raw)
  To: Oleksandr_Andrushchenko, Volodymyr_Babchuk, catalin.marinas,
	gregkh, mark.rutland
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    arm64: mm: avoid name clash in __page_to_voff()

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-mm-avoid-name-clash-in-__page_to_voff.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 1c8a946bf3754a59cba1fc373949a8114bfe5aaa Mon Sep 17 00:00:00 2001
From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
Date: Wed, 18 Jan 2017 09:09:25 +0200
Subject: arm64: mm: avoid name clash in __page_to_voff()

From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>

commit 1c8a946bf3754a59cba1fc373949a8114bfe5aaa upstream.

The arm64 __page_to_voff() macro takes a parameter called 'page', and
also refers to 'struct page'. Thus, if the value passed in is not
called 'page', we'll refer to the wrong struct name (which might not
exist).

Fixes: 3fa72fe9c614 ("arm64: mm: fix __page_to_voff definition")
Acked-by: Mark Rutland <mark.rutland@arm.com>
Suggested-by: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Signed-off-by: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/include/asm/memory.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_ad
 #define _virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 #else
 #define __virt_to_pgoff(kaddr)	(((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page))
-#define __page_to_voff(page)	(((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
+#define __page_to_voff(kaddr)	(((u64)(kaddr) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
 
 #define page_to_virt(page)	((void *)((__page_to_voff(page)) | PAGE_OFFSET))
 #define virt_to_page(vaddr)	((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))


Patches currently in stable-queue which might be from Oleksandr_Andrushchenko@epam.com are

queue-4.9/arm64-mm-avoid-name-clash-in-__page_to_voff.patch

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

only message in thread, other threads:[~2017-01-23 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 16:02 Patch "arm64: mm: avoid name clash in __page_to_voff()" has been added to the 4.9-stable tree gregkh

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).