summaryrefslogtreecommitdiff
path: root/target/linux/coldfire/patches/011-mcfv4e_namespace_align.patch
blob: 6bdac88458ae006afa9cc18b129f7b49fa7a5c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From a51f4e9bff26cc43b53938169f98c27183ec63ea Mon Sep 17 00:00:00 2001
From: Kurt Mahan <kmahan@freescale.com>
Date: Wed, 31 Oct 2007 17:08:59 -0600
Subject: [PATCH] Change to align on page size for COLDFIRE.

LTIBName: mcfv4e-namespace-align
Signed-off-by: Kurt Mahan <kmahan@freescale.com>
---
 fs/namespace.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1364,7 +1364,11 @@ int copy_mount_options(const void __user
 	/* copy_from_user cannot cross TASK_SIZE ! */
 	size = TASK_SIZE - (unsigned long)data;
 	if (size > PAGE_SIZE)
+#ifndef CONFIG_COLDFIRE
 		size = PAGE_SIZE;
+#else
+		size = PAGE_SIZE - ((unsigned long)data & ~PAGE_MASK);
+#endif
 
 	i = size - exact_copy_from_user((void *)page, data, size);
 	if (!i) {