All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: ensure that mmapped shared pages are aligned at SHMLBA addresses
@ 2013-02-02 23:44 Helge Deller
  0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2013-02-02 23:44 UTC (permalink / raw)
  To: linux-parisc, James Bottomley, John David Anglin

Author: John David Anglin <dave.anglin@bell.net>

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
index f76c108..a047b32 100644
--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -94,11 +94,12 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
 {
 	if (len > TASK_SIZE)
 		return -ENOMEM;
-	/* Might want to check for cache aliasing issues for MAP_FIXED case
-	 * like ARM or MIPS ??? --BenH.
-	 */
-	if (flags & MAP_FIXED)
+	if (flags & MAP_FIXED) {
+		if ((flags & MAP_SHARED) &&
+		    (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))
+			return -EINVAL;
 		return addr;
+	}
 	if (!addr)
 		addr = TASK_UNMAPPED_BASE;
 

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

only message in thread, other threads:[~2013-02-02 23:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-02 23:44 [PATCH] parisc: ensure that mmapped shared pages are aligned at SHMLBA addresses Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.