aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/lib/user_fixup.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-12-01 05:48:26 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-01 05:48:26 -0500
commitb270ee8a9fc9547eb781ce9ccd379450bcf9a204 (patch)
tree47d960dc0f094597462148326c1650045044a768 /arch/sparc64/lib/user_fixup.c
parentbe1ffce3527d800ad50b955ede6eb44811cefd03 (diff)
sparc64: Fix offset calculation in compute_size()
The fault address is somewhere inside of the buffer, not before it. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/lib/user_fixup.c')
-rw-r--r--arch/sparc64/lib/user_fixup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/lib/user_fixup.c b/arch/sparc64/lib/user_fixup.c
index 19d1fdb17d0e..05a361b0a1a4 100644
--- a/arch/sparc64/lib/user_fixup.c
+++ b/arch/sparc64/lib/user_fixup.c
@@ -24,7 +24,7 @@ static unsigned long compute_size(unsigned long start, unsigned long size, unsig
24 if (fault_addr < start || fault_addr >= end) { 24 if (fault_addr < start || fault_addr >= end) {
25 *offset = 0; 25 *offset = 0;
26 } else { 26 } else {
27 *offset = start - fault_addr; 27 *offset = fault_addr - start;
28 size = end - fault_addr; 28 size = end - fault_addr;
29 } 29 }
30 return size; 30 return size;